typeDef

P

Priya Mishra

What is wrong in the below code,
I get the 2 error when i compile the prog... what is mean ??

error C2275: structure: illegal use of this type as an expression
error C2065: str: undeclared identifier


typedef struct
{
char file;
int a;
int b;
int c;

} structure;

int func(structure *ObjectType,
char *fileName);



int main(int argc, char **argv )
{

int error;
structure *str;


error = func(&str, "abc.txt", 1);

return error;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top