Hi,
Im doing this tutorial that was made for a slightly different program (im using MS Visual Studio) and my code doesn't work:
I can't store stuff in a string!
I don't know where I have gone wrong/what is wrong with MS VSCode:#include <iostream.h> #include <string.h> #include <sstream> using namespace std; string name = ""; // " " means an empty string! ;D int main(void) { cout<< "What is your name?\n"; cin>> name; cout<< "Hello " << name.c_str(); return 0; }
Any ideas??