i keep getting a error , termination terminated incorrectly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uditkumar95
    New Member
    • Jan 2012
    • 3

    i keep getting a error , termination terminated incorrectly

    #include<iostre am.h>
    #include<conio. h>
    struct student
    {
    char name [20];
    int age;
    int roll;
    };
    void main();
    {
    clrscr();
    student a;
    cout<<"please enter name: ";
    cin>>a.name;
    cout<<"please enter age: ";
    cin>>a.age;
    cout<<"please enter roll no: ";
    cin>>a. roll;
    cout<<"the name is: "<<a.name;
    cout<<"the age is: "<<a.age;
    cout<<"the roll no is: "<<a.roll;
    getch()
    };
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You don't have a semicolon after getch().

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      BTW, you do not want that semicolon following the last end-brace.

      Comment

      Working...