Virus King
Member level 2
- Joined
- Feb 26, 2007
- Messages
- 48
- Helped
- 2
- Reputation
- 4
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- JaMaN RoAd BaNnU
- Activity points
- 1,602
all of us know that by using int,float,char before main(), we have to use return 0; in the end of program. as shown below
int main()
{
return 0;
}
as we know that int float char are abstract data types.
and struct is composite data type, so by using my composite data type why turbo c compiler gives us error as shown below
struct student
{
int class;
float gpa;
};
student main()
{
student s1;
cout<<"plz enter class and gpa";
cin>>s1.gpa>>s1.class;
return 0;
}
int main()
{
return 0;
}
as we know that int float char are abstract data types.
and struct is composite data type, so by using my composite data type why turbo c compiler gives us error as shown below
struct student
{
int class;
float gpa;
};
student main()
{
student s1;
cout<<"plz enter class and gpa";
cin>>s1.gpa>>s1.class;
return 0;
}