1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

'bout strings.. please help:(

Discussion in 'Meet and Greet' started by Jazel, Oct 1, 2010.

Thread Status:
Not open for further replies.
  1. Jazel

    Jazel New Member

    Joined:
    Sep 23, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Davao city[Philippines]
    ..how can i display what I've just input, including space?????
    example
    Name: Jazel Juarez
    ---> I've tried it but only the first word did print out
    -----
    char question[] = "Name: ";

    char urname[80];
    cout<<question;
    getline(cin,question);
    cin>>urname;
    cout<<urname<<"!";
    -->the program above... have 2 errors
    1.declaration syntax error
    2. the function getline should have prototype
    please help me:( thanks!
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    1
    Trophy Points:
    0
Thread Status:
Not open for further replies.

Share This Page