lundi 29 juin 2015

Issue when defining C struct... (AKA frustration)


Hey so I'm simply trying to define a struct. I'm probably being an idiot, but hey, I'm trying.

Doing this:

struct Neuron{
    float mu;
    float stim[10];
    float hist[10];
    int ns[10000];
    float st[10000];
    float cup[8][10];

};


struct Neuron nur1;


nur1.mu = -0.7;

Getting this:

error: unknown type name 'nur1'

I do not understand why this is. It's all in the same .c file. Maybe compilation issues? Simply using gcc my_file.c on mac OS X. <3 <3


Aucun commentaire:

Enregistrer un commentaire