C++ question plz help
Posted: Sat Oct 17, 2009 1:00 am
Hello i was wonder how you can change a string name cause when i try to do
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main ()
{
char *line = "short line for testing";
sting s1;
s1 = "Name";
cout << "Hello what is your name?\n";
cin >> s1;
cout << "Hello " << s1;
system("PAUSE");
return 0;
}
there's a problem and i don't know what it is i would appreciate if someone could help me.
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main ()
{
char *line = "short line for testing";
sting s1;
s1 = "Name";
cout << "Hello what is your name?\n";
cin >> s1;
cout << "Hello " << s1;
system("PAUSE");
return 0;
}
there's a problem and i don't know what it is i would appreciate if someone could help me.