Message from C, C++ discussions
January 2020
— Good evening. I've only been using C ++ since yesterday and I'm having some minor problems: I saw "return 0" on the web but I didn't understand what it is for. In addition I don't understand how to convert an int variable into a string variable and lastly because when I click I send the code does not go on like in Python. sorry for my english but i'm italian
1. return 0 just retuns a number 0 from current function.
2. int a = 1; std::stringstream ss; ss << a; string intstring = ss.str();
3. you need to compile the program to run it
— What the fuck
— ? ? ?
— I am from Finland. No entiendo Italian
— No, not italy
— I compiled it and it works but when I click send Nothing happens. I'll give you an example:
When the user clicks send the program closes. In Python it was enough to make input () but here?
— ?
— Just send your code
— Aah!
add to the end
std::string input;
std::cin >> input;
— 2 seconds
— If you are on windows, you can use system("pause");