I am really new to c programming and c++. I am currently trying to write a program and I am having trouble. I have three variables. One is a floating variable, one is an integer, and the last is a character. I can not figure how to combne them into a single string. Any help would be greatly appreciated
float f = 123.456;
int i = 789;
char c = '!';
stringstream ss; // #include<sstream> for this
ss << f << i << c;
ss.str(); // returns a std::string containing "123.456789!"