dpq
dpq

Reputation: 9278

Extern struct in C

I have a C file generated with f2c (Fortran to C translator) that contains the following C structure:

struct {
    real rez, pi, st;
} const_;

How can I declare this const_ variable as an external in another .c file without modifying the one generated by f2c?

Upvotes: 7

Views: 2139

Answers (1)

Svisstack
Svisstack

Reputation: 16656

In another file.

extern struct {
    real rez, pi, st;
} const_;

Upvotes: 6

Related Questions