C++ :: File Transfer Using FTP / TCP IP In Windows
Sep 13, 2012
I need to copy a file from remote location.
I know following information.
a) Address of the remote file location
b) Port number
c) File Name
d) Size of file in bytes
How i copy the file from specified port/socket and write it to the file opened in local machine.
View 3 Replies
ADVERTISEMENT
Jun 27, 2014
how send and receive images from linux server to windows client?
View 2 Replies
View Related
Jan 18, 2015
I need to transfer the content from the file text.txt to file sort.txt . The data in the text.txt is "struct" (info about people)but the same data needs to be sorted by the name and sent to sort.txt by using a function .
View 9 Replies
View Related
Aug 4, 2014
how could I transfer a .txt file from Computer A to Computer B using c++. (over LAN)
View 3 Replies
View Related
Sep 1, 2013
I have to make a server-client file transfer using UDP . I have created a basic server which receives message sent by client . That's all. Now comes the major part :-
1. The message sent by client is the name of file
.2. Now the server checks whether there exists this file or not .
3. If there exists it sends the file to the client and it also keeps the count of the number of requests of file made by the client . Here is the Server Code
Code:
#include<sys/socket.h>
#include<arpa/inet.h>
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
#include<sys/types.h>
#include<string.h>
}
[code]...
The server reads the data from file and writes into it and send to the client , On the other end client receive the data and make duplicate of this file and write into it. But on compiling it gives error in reading the file.
View 4 Replies
View Related
Apr 9, 2014
I'm making a program in which it will read an input from a text file and then count the numbers of spaces , characters , words . Here is what i think it would work : First i will transfer the contents from the input.txt into a string , after that i will create 3 strings which contain each of these : spaces , characters , words . Then comparing each of the contents of the intput.txt_string to the other 3 strings .
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
[code]....
and of course it doesnt seem to work...
View 1 Replies
View Related
Oct 1, 2014
I need to transfer files(mainly images) between 2 computers using their RAM with some kind of FTP. I'm using C++. I guess it's pretty a lot to explain so if you have a clear and detailed articles/videos
View 8 Replies
View Related
Jul 8, 2014
My assignment asks me to read inputs from a certain file which has data as shown below:
else if (menu == 3) {
ofstream outFile("output.txt");
Shares share1 = shareList.get(0);
double price1 = share1.getTradePrice();
time24 time1 = share1.getT();
[Code] ....
View 1 Replies
View Related
Oct 21, 2014
I have a problem with my assignment. I would like to ask how to transfer positive and negative values from array temperature to arrays positive and negative?
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
int n=0, d=0, temperature[20], sum;
int positive[], negative[];
float avg;
[code]....
View 5 Replies
View Related
Sep 4, 2012
Code:
void Class1::Func(shared_ptr<type1> parameter)
{
}
or
void Class1::Func(const shared_ptr<type1>& parameter)
{
}
or
Should I ever pass arguments/parameters to other objects using shared_ptr's or raw pointers?
View 3 Replies
View Related
Apr 14, 2014
I am starting a project in a few weeks that needs to be able to prevent an executable from running until it has been checked for various criteria (think of it as a DIY anti virus).
My main idea is to build a file filter driver in C to hook into file system reads and writes and prevent executables that I don't like from executing off the disk.
View 1 Replies
View Related
Nov 28, 2012
I transferred data from parent to child. Problem occurred while send data from child to parent dialog.
Find the attachment....
void CChildDlg::OnBnClickedCancel() {
child1ctrl.GetWindowText(parObj.parentval);
::AfxMessageBox(parObj.parentval);
//parObj.parentctrl.SetWindowText(child1val);
[Code] ....
View 8 Replies
View Related
Feb 7, 2015
I want to load a file to rich text box component. I have this line:
richTextBox1->LoadFile("StudentaiRez.txt", RichTextBoxStreamType->PlainText);
But I get an error when I try to pass second parameter. It says : type name is not allowed.
I probably write it wrong, but I can't remember the correct way. In examples I only see that instead of -> dot is used, but it doesn't work either.
View 1 Replies
View Related
Dec 7, 2014
I need to apply theme file in windows form but I can't. When I use the code below I get error because there is no System.Windows.Application
StreamResourceInfo sri = System.Windows.Application.GetResourceStream(
new Uri("App.xaml", UriKind.Relative));
var resources = (System.Windows.ResourceDictionary)Load(sri.Stream); ;
var app = new System.Windows.Application();
app.Resources.MergedDictionaries.Add(resources);
View 2 Replies
View Related
Apr 11, 2013
My sample.h is
#include <string>
namespace xxx
{
class abc
[Code]....
My Question is when i compile this code in Linux platform Using g++ compiler My sample.o's Size is 1Kb.. But when the same code is compiled in Windows platform using VC++ Compiler , My sample.o's size is 42Kb..to reduce the size in windows... Is there any proble with '#include <string>' in Windows platform.
View 3 Replies
View Related
Sep 27, 2013
I need to be able to actually read my encrypted file..
I have the decryption code and works perfectly when running it through console app c++.
But, the way I decrypt is to decrypt from a file, and create a new file which is decrypted.
I can't use that kind of code in my program in windows form app c++..
I need to read the encrypted text file and decrypt it in memory while using it for my program..
Some links to my codes I use at the moment.
My decryption coded in console application: [URL] ....
My decryption code edited for form application (Did not do anything) [URL] ....
And this is the code I tried to read after it got decrypted (Reading file written in combobox_selectedindexchange: [URL] ....
View 2 Replies
View Related
Apr 25, 2014
Examples: "sql.h" header file how to skip compile in vs 2008 ?
View 2 Replies
View Related
Dec 9, 2014
How can i put double click to open the file in treeview
private void button1_Click( object sender, EventArgs e ) {
XmlDataDocument xmldoc = new XmlDataDocument();
XmlNode xmlnode;
[Code] ....
View 2 Replies
View Related
Oct 11, 2014
I have a problem with an extension DLL that has an exported function. The function is being exported ok, it is called by a Windows service. The Windows service is using the exported function, and everything works. I am trying to create a file with:
ofstream file;
file.open("C:dir ofile", ios:ut);
file << "text";
But nothing happnes however. There are no errors, the file is just not created. Also, if i try to call MessageBox() in the exported function, nothing happens as well . I have a .h file which exports the function with __declspec(dllexport) DWORD WINAPI functionName(), and also a .cpp file with the function definition. There is no main().
View 4 Replies
View Related
Apr 26, 2014
I have my main.cpp like this:
#include <iostream>
#include "curve1.h"
#include "curve2.h"
using namespace std;
int main() {
Curve1 curve1Obj;
Curve2 curve2Obj;
[Code]...
Base class Score has two derived classes Curve1 and Curve2. There are two curve() functions, one is in Curve1 and other in Curve2 classes. getSize() returns the value of iSize.
My base class header score.h looks like this:
#ifndef SCORE_H
#define SCORE_H
class Score {
private:
int *ipScore;
float fAverage;
int iSize;
[Code]...
You can see that I have used curve1Obj to enter scores, calculate average and output. So if I call getSize() function with cuve1Obj, it gives the right size that I took from user in enterScores() function. Also the result is same if I call getSize() in score.cpp definition file in any of the functions (obviously).
.....
The problem is when I call curve() function of Curve2 class in main (line 23) with the object curve2Obj, it creates a new set of ipScore, fAverage and iSize (i think?) with garbage values. So when I call getSize() in curve() definition in curve2.cpp, it outputs the garbage. .....
How can I cause it to return the old values that are set in curve1.cpp?
Here is my curve2.cpp
#include <iostream>
#include "curve2.h"
using namespace std;
void Curve2::curve() {
cout << "getSize() returns: " << getSize() << endl; // out comes the garbage
}
Can I use a function to simply put values from old to new variables? If yes then how?
View 3 Replies
View Related
Jul 20, 2014
I need VC++ code,for copy the particular data from Notepad to another Notepad. Example, i have lots of data, i need to copy the particular content from Notepad to another Note pad.
Notepad 1:
<Debug: LogRLZ> arg Answer = windows //WINDOWS option will go to excel sheet
<Debug: LogRLZ> arg Answer = patio_doors //patio_doors option will go to excel sheet
<Debug: LogRLZ> arg Answer = entry_doors //entry_doors option will go to excel sheet
Notepad 2_expected Result:
windows
patio_doors
entry_doors
Same kind of datas are available in Notepad.
View 5 Replies
View Related
Oct 13, 2014
How to read a file line by line and then later access them by doing something like
Code:
lines[0] //Line number one
...
lines[100] //Line number one hundred and one
lines[100][0] //L
lines[100][1] //i
lines[100][2] //n
lines[100][3] //e
lines[100][4] //
lines[100][5] //n
...
View 13 Replies
View Related
Sep 7, 2013
How to make if else code below into SWITCH STATEMENT?
cout << "Enter the temperature: ";
cin >> temp;
cout << "Enter the pressure: ";
cin >> pressure;
cout <<endl;
[Code]....
View 6 Replies
View Related
Oct 12, 2012
I'd like to compile following code:
Code:
sigfillset( &sa.sa_mask );
sa.sa_handler = &CDevice::PipeHandler;
sa.sa_flags = 0;
sigaction( SIGPIPE, &sa, NULL );
sa.sa_handler = &CDevice::TerminatorHandler;
sigaction( SIGQUIT, &sa, NULL );
sigaction( SIGINT, &sa, NULL );
Using MSVC 2010 to run on Windows 7. Is it possible?
View 1 Replies
View Related
Jul 2, 2012
Here are the libraries included:
#include <iostream>
#include <cmath>
#include <cstdlib>
#include "stat.h"
And heres the line being flagged:
d=ttl*drand48()-fit[0]; //intialize to reigon for first entry
The error I receive is one discussed on a number of different forums:
C:Documents and SettingssarabrownDesktopSarahScheduling Codestat.cpp|181|error: `drand48' undeclared (first use this function)|
C:Documents and SettingssarabrownDesktopSarahScheduling Codestat.cpp|181|error: (Each undeclared identifier is reported only once for each function it appears in.)|
||=== Build finished: 2 errors, 1 warnings ===|
It just seems to me theres a lot of conflicting information about if this is even possible to do on Windows and when I do try work around functions or calling double drand(void) I get a ton of errors. I'm hesitant to try rand() or something less precise. I was hoping maybe someone would be able to maybe suggest a compiler which will run this or a different library, right now I'm using Code Blocks IDE.
View 1 Replies
View Related
Nov 14, 2013
I am wondering how can I read a website from a given url in windows ?
View 3 Replies
View Related