The question is:
What i need to know is how i can put a variable into a function..which is System("");
but for a more detailed question please read on below
Hi im new to C++ but do know (html,asp,php,mysql,javascript) all the major internet ones so i have a coding background. My question is that im trying to make a basic program to later become more in depth but what it is to do is take a typed in message then send it to another computer but before even getting to this far i have stummbled. im using the commandwhat i need inside the system command isCode:System(" .... ");In case your lost already this is what i have alreadyCode:net send pcname string
Code:#include <iostream.h> #include <stdlib.h> int main(void) { char string[256]; char string2[256]; cout<<"Please enter your Message to pcname:"; cin.getline(string, 256, '\n'); cout <<"You entered: "<<string; cout <<"\n\n"; system("net send pcname" <<string); system("Pause"); return 0; }
its getting the bit in the system part to work
it should basically read
HELLO WORLD being whatever string is.Code:System("net send pcname HELLO WORLD");
After all that what i need to know is how i can put a variable into a function..which is System("");
Sorry if ive confused anyone but any help will be MUCH appreciated
Thanks
Chris Ella



LinkBack URL
About LinkBacks


