The problem is that my program crasches when at line 13. Pot10 i an int and lgth is an int so whats the problem? I can't figure it out:(
typedef struct ArrInt{
int intM[100], lgth;
} megaint;
void scanMeg(megaint *x){
int Pot10 = 0, ret,IntArr[100];
char c;
while( (c = getchar()) != '\n'){
IntArr[Pot10] = atoi(&c);
Pot10++;
}
x->lgth = Pot10;
for(ret=0; Pot10 >= 0; Pot10--, ret++)
x->intM[ret] = IntArr[Pot10];
}