gimme the error plz 
it says undefined symbol _main in module c0.asm
    #include<iostream.h>
    class largest
      {  private :
           int num1,num2,num3,big;
         public :
           void enter(int a,int b,int c);
           void max(void);
           void display(void);
      };


           void largest::enter(int a,int b,int c)
         {
           cout<<"Enter numbers n";
           a=num1;
           b=num2;
           c=num3;
           cin>>a>>b>>c;
           }
        void largest::max(void)
        { big=num1;
          if(num2>big)
           big=num2;
          if(num3>big)
           big=num3;

           }
        void largest::display(void)
        {cout<<"n largest number" <<" " <<big<<endl;
        }

Edited 2 Years Ago by Aditya_8

C++ programs begin at the function called main. You don't have a function called main, so you can't make this into a program.

Are you trying to make a program or a library?

Edited 2 Years Ago by Moschops

This is wrong:

void largest::enter(int a,int b,int c)
{
    cout<<"Enter numbers n";
    a=num1;
    b=num2;
    c=num3;
    cin>>a>>b>>c;
}

Try this:

void largest::enter(int a,int b,int c)
{
    cout<<"Enter numbers a,b,c";
    cin>>a>>b>>c;

    num1 = a;
    num2 = b;
    num3 = c;
}

Assigning a,b,c from the member variables isn't the problem. Not storing the input back is.

Moschops already explained the error message over 8 hours ago. Either you failed to read it or didn't understand it. You have to have a function called main() in your program.

This article has been dead for over six months. Start a new discussion instead.