N
Naive Programmer
Hi,
I need some simple help. First, I should apologize: I am a total
programming fool in C++ and am trying to get some basic structs
working before I attempt classes. I can't seem to get the references
to those structs working properly and need help.
Suppose I have:
struct info
{
int color;
int count;
};
struct queue{
int front;
info list[15];
};
struct queue holding[20];
First, did I get the syntax right above?
Second, it this the right syntax for setting to 5 the color of list
element 0 of holding element 0?
holding[0].list[0].color = 5
Both of these pass through the compiler fine But
holding[0].list[0].color doesn't seem to appear properly on my VC++
variables list when I run in debug mode. It doesn't display anything
within list, when I think it should display color and count. What's
wrong? Thanks!
I need some simple help. First, I should apologize: I am a total
programming fool in C++ and am trying to get some basic structs
working before I attempt classes. I can't seem to get the references
to those structs working properly and need help.
Suppose I have:
struct info
{
int color;
int count;
};
struct queue{
int front;
info list[15];
};
struct queue holding[20];
First, did I get the syntax right above?
Second, it this the right syntax for setting to 5 the color of list
element 0 of holding element 0?
holding[0].list[0].color = 5
Both of these pass through the compiler fine But
holding[0].list[0].color doesn't seem to appear properly on my VC++
variables list when I run in debug mode. It doesn't display anything
within list, when I think it should display color and count. What's
wrong? Thanks!