CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Threaded View

  1. #1
    Join Date
    Dec 2008
    Posts
    27

    C++ code problem

    i am just getting started with using C++ and i was wandering if somebody could tell me were i went wrong in my code and show me how it is supposed to be done any help would be great. here is the code

    Code:
    #include<iostream.h>
    
    //declares as type int
    int First,Middle,Last
    //main program starts
     int main ()
    {
     char first,middle,last;
    
    cout << "enter your name: \n" ;
    cout << "\ First: " ;
    cin >> First;
    cout << "\ Middle: " ;
    cin >> Middle ;
    cout << "\ Last: " ;
    cin >> Last ;
    cout << " welcome," "<<First <<Middle <<Last \n" ;
    //main program end
    return 0;
    }
    Last edited by twistedmike; December 25th, 2008 at 10:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured