Search:

Type: Posts; User: tabstop

Search: Search took 0.17 seconds.

  1. Replies
    27
    Views
    6,844

    Wait, does OP need a function to create the...

    Wait, does OP need a function to create the variable? I thought we were doing
    header:


    extern double phys_MO;

    one C file:


    double phys_MO = 4.29496E-6;
  2. Replies
    27
    Views
    6,844

    One time. If you don't put extern on it in the...

    One time. If you don't put extern on it in the header, then you're declaring it a lot of times -- one time every time you #include the header.
  3. Replies
    27
    Views
    6,844

    I'll bet you a nickel that you now have two .o...

    I'll bet you a nickel that you now have two .o files in that directory. And also, if you put int X=5 in your two.c file you'd get different answers.

    EDIT: Nope, I'm wrong. GCC doesn't write out...
  4. Replies
    27
    Views
    6,844

    You should look at the word "extern".

    You should look at the word "extern".
Results 1 to 4 of 4