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

Similar Threads

typeDef 1
Correct Typedef 45
Array of structs function pointer 10
Command Line Arguments 0
Lexical Analysis on C++ 1
typedef struct 39
typedef function with void parameters 14
Upgrade to VC2010 2

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top