Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
C++ variables && system()
CProgramming.com FTW!
Zeke, that's now how it works.
use "cout" if you simply wanted to manipulate how your strings are getting displayed in your program. If you wanted to interact with the OS, then use the system() function. Look at this example and get an idea of how it works:
directory=system ("dir");
You can also use:
system("pause");
It's the equivalent of the:
getchar();
Simply pauses the system and wait for the user to press [ANY] key.
cin << message;
system("msg * 'your message is: ' << message");```
That won't work. You're trying to use System, like "cout". Do:
>
String message;
cin >> message;
cout << "Your Message is" << message;
+ You only use single quotes for single character. And double quotes for strings. Hope you get the idea.
+ Also, your "cin" and "cout" operators are reversed. For "cin" it's >>, and for "cout" it's <<. Practice will make you remember.