help me

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oumer
    New Member
    • Nov 2006
    • 2

    help me

    please give me an example of program that sorts this struct memeber
    struct new
    {
    int id;
    };
    new type;
    void main()
    {
    cout<<"how many id's\n";
    cin>>n;
    for(int i=0;i<=n-1;i++)
    {
    cout<<"enter id\n";
    cin>>type.id;
    }
    fill out put too please
  • sivadhas2006
    New Member
    • Nov 2006
    • 142

    #2
    Hi,

    Your program has some errors.


    I corrected the errors.
    Code:
    struct structEmp
    {
       int id;
    };
    structEmp type;
    
    #include <iostream.h>
    void main()
    {
       int
          n = 0;
    
       cout<<"how many id's\n";
       cin>>n;
       for(int i=0;i<=n-1;i++)
       {
          cout<<"enter id\n";
          cin>>type.id;
       }
    }
    Regards,
    M.Sivadhas.

    Comment

    Working...