typeDef

Discussion in 'C Programming' started by Priya Mishra, Jul 13, 2005.

  1. Priya Mishra

    Priya Mishra Guest

    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;
    }
    Priya Mishra, Jul 13, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Green

    java needs typedef

    Steve Green, Mar 24, 2005, in forum: Java
    Replies:
    11
    Views:
    11,354
    Joona I Palaste
    Mar 25, 2005
  2. qazmlp

    typedef enum

    qazmlp, Jul 2, 2003, in forum: C++
    Replies:
    2
    Views:
    452
    Alexander Terekhov
    Jul 2, 2003
  3. Robert A. T. Kaldy

    template typedef as return type

    Robert A. T. Kaldy, Jul 9, 2003, in forum: C++
    Replies:
    1
    Views:
    406
    Michael Kochetkov
    Jul 9, 2003
  4. Richard van Wegen

    Typedef of a template?

    Richard van Wegen, Jul 14, 2003, in forum: C++
    Replies:
    3
    Views:
    436
    Richard van Wegen
    Jul 15, 2003
  5. oor
    Replies:
    0
    Views:
    1,329
Loading...

Share This Page