-
Notifications
You must be signed in to change notification settings - Fork 0
printString
notdanik edited this page Oct 13, 2020
·
1 revision
The printString function is used to print strings. This saves you the time you would spend making cout, since you are able to use standart c++ string manipulation. This means you are able to do
printString("test" + variable + "more text" + moreVariable");instead of
std::cout << "test" << variable << "more text" << moreVariable << '\n';Keep in mind the variables have to be string. Otherwise it will not work!
string name;
printString("Please enter your name:");
cin >> name;
printString("Your name is " + name + ". Thats a nice name!");