Thanks laserlight that was very helpful. I renamed the inclusion guard and removed
struct Article *art_1; completely. Now it works fine. I do not understand why I am using a pointer Article.art_1...
Type: Posts; User: sjmp
Thanks laserlight that was very helpful. I renamed the inclusion guard and removed
struct Article *art_1; completely. Now it works fine. I do not understand why I am using a pointer Article.art_1...
I added it based on an error in the compiler: This is what I get if I add it back. Without it I get unexpected type and missing function header
1>header.h(11): error C2226: syntax error : unexpected...
Can someone please help me figure out what is wrong here. Not clear on how to define the struct name after declaring the struct itself. And void print does not like me using the keyword struct.
...
Let me try to take a step back and accomplish this in steps.
Here is the HW -
1. Create Article which the contents are assigned at initialization level
2. Printing the Article is done w Print()...
So i went back and did some reading but I am still confused on the use of typedef vs. tag, when do I need an Alias for the struct, and do not have a clue how to use a pointer to the struct.I cannot...
For a HW assignment I have to create a structure called Article
typedef struct
{
int number;
int quantity;
char description[STR_LEN+1];
} Article;