468,101 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

how to define struct within struct

1
i have problem in define struct within struct


struct student_detail
{
int id;
string name;
};

struct subject_detail
{
double ass1, ass2;
double test1, test2;
double totalass, totaltest, totalfinal;
double coursework, result, final;
char grade;
};

struct student_subject
{
student_detail record;
subject_detail details[3];
} student_Record[2];


when i was write like this, i see the error say my struct student_subject have problem but i donno what is the problem , so i hope can find the solution about this , thanks
Nov 18 '07 #1
2 2537
oler1s
671 Expert 512MB
1. Use CODE tags. Forum rules. And we also require them to read code properly.

2. Mind telling us precisely what that error was? It's not very hard to use copy and paste.
Nov 18 '07 #2
AHMEDYO
112 100+
HI...

i cant find any error with your code except you may be didnt include specified header file for string class, your code working good with VC++ 6.0, may be you can tell us what version you use and the error description


Many thanx.
Nov 18 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Morgan Cheng | last post: by
3 posts views Thread by theotyflos | last post: by
5 posts views Thread by Daniel Rudy | last post: by
2 posts views Thread by JH Trauntvein | last post: by
12 posts views Thread by djhong | last post: by
4 posts views Thread by _mario.lat | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.