RE: [Dev-C++] quick question about sending stuff to windows
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2002-01-09 13:45:32
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Leonard Mazzone
> Sent: Wednesday, January 09, 2002 3:16 AM
> To: dev...@li...
> Subject: [Dev-C++] quick question about sending stuff to windows
>
>
> im tring to make a quicky chat program for me and my friends
> to use over the school network. what i have so far looks like this :
>
> //net send simplyfier, good for lan chat
>
>
> #include <iostream.h>
> #include <stdlib.h>
>
> int main()
> {
> char name [20] ; //define variables
> char text [100] ;
> cout << ("what user to you want to
> messsage?" "\n")
> ;
> cin >> name ;
> cout << name ; //verbose
> cout << ("\n") ; //ending line
> cout << ("what is the text of the message
> you wish to send?" "\n");
> cin >> "text" ;
> cout << "text" ; //verbose
> cout << ("\n"); //ending
> line, is there a
> better way?
> system("net send name text"); // uses the
> net command to send the text to the receiver's computer
> *need to figure out how to send my variables with it.
> system("PAUSE"); //die!
> return 0;
> }
> i know very little about c++ and attempting to teach myself
> any ideas about line 19 anone?
> specifically how can i get the varibles name and text passed
> along to the net send command
>
>
>
> regards and thank you in advance
>
> -len
string s1="text1";
string s2="test2";
string s3=s1+s2; // s3=="text1text2"
With the above technique you can do the job.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|