C++ question plz help

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
pvtlink
Posts: 6
Joined: Thu Oct 15, 2009 11:07 pm

C++ question plz help

Post by pvtlink »

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.
User avatar
Perry
Posts: 409
Joined: Tue Jun 23, 2009 4:26 pm

Re: C++ question plz help

Post by Perry »

It is just spelling mistake. Look at line ten...
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: C++ question plz help

Post by hallsofvallhalla »

nice catch perry :)
pvtlink
Posts: 6
Joined: Thu Oct 15, 2009 11:07 pm

Re: C++ question plz help

Post by pvtlink »

Thank you i didn't see that.
User avatar
Perry
Posts: 409
Joined: Tue Jun 23, 2009 4:26 pm

Re: C++ question plz help

Post by Perry »

pvtlink wrote:Thank you i didn't see that.
No problem. :D Glad to help. Post anymore question you might have and I will see what I can do to help.
Post Reply

Return to “Advanced Help and Support”