472,988 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

how to define struct within struct

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 2722
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
112 100+

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

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

Similar topics

by: Morgan Cheng | last post by:
Hi, In my program module, there are some Constants should be defined to be integer key value of std::map. In the module, methods of a few classes will return std::map containing value indexed by...
by: theotyflos | last post by:
Hi all, I have the following: /*--- SNIP ---*/ typedef struct Argument_s { char *address; int type;
by: baumann | last post by:
hi all, typedef int (*pfunc)(int , int); pfunc a_func; i know it's ok, but how can define a_func without typedef statement? thanks .
by: Daniel Rudy | last post by:
What is the purpose of having a #define inside a struct? typedef struct { uByte bLength; uByte bDescriptorType; uWord wTotalLength; uByte bNumInterface;...
by: Daniel Rudy | last post by:
Is the following code legal? typedef stuct data_type_tag { int var1; int var2; int var3; struct { void *p; size_t size; unsigned int flags;
by: JH Trauntvein | last post by:
I recently tried an experiment to see if I could define a functor within a class method as shown here: #include <list> #include <algorithm> #include <iostream> class MyClass {
by: djhong | last post by:
Following is a snippet of a header file. Here, #define are inside struct evConn{} Any advantage of putting them inside struct block? Looks like there is no diff in scoping of each...
by: _mario.lat | last post by:
for struct: struct in6_addr { uint8_t s6_addr; }; is provided a costant: #define IN6ADDR_LOOPBACK_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}} what does means {{{, and }}}?
by: anon.asdf | last post by:
Hello! In the following code-snippet, is it possible to initialize each element of arr, with STRUCT_INIT? struct mystruct { int a; char b; };
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.