Skip to content

printString

notdanik edited this page Oct 13, 2020 · 1 revision

printString

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!

Example of usage:

string name;
printString("Please enter your name:");
cin >> name;
printString("Your name is " + name + ". Thats a nice name!");

Wiki

Functions:

Classes

  • ...

Other features

Clone this wiki locally