dez_666
Thread Starter
- Joined
- May 29, 2007
- Messages
- 842
Hi im like just learning C++ and i decided to take a big leap by going from knowing how to use cout to making command line parameters. 
So i tried this..
And yes, the commented part was going to be a function but i couldnt get it to work so i just commented it for later experimentation. So when i run this by typing in "adder.exe 1 2"
i get an output of "8013972". can someone tell me what im doing wrong?
its probably something stupid that i missed.
So i tried this..
Code:
#include <cstdlib>
#include <iostream>
/* int Add (char x,char y)
{
return(x+y);
}
*/
int main(int argc, int argv[])
{
using std::cout;
using std::endl;
cout << argv[0]+argv[1] << endl;
}
i get an output of "8013972". can someone tell me what im doing wrong?
its probably something stupid that i missed.