I have this (example) code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string myvar = "string" + 5;
cout<<myvar<<endl;
return 0;
}
I want this to print string5
, like it would in Python
, but instead, it prints g
. How do I get C++
to do this? I haven't gotten anywhere with googling.
I'm pretty new to C++