how to make an int array? *basic question
hi, i want to use things like:
int in;
in[1] = 1;
in[2] = 1;
in[4] = 6;
in [i] = i;
so later i can check things like:
if(in[i] == 1){
do things();
}
else if(in[i] == 2){
do things2();
}
what type of thingy do i need to create for this?
i tried char in[200]; but it allways said in[i] == 1 for any value O_o
Re: how to make an int array? *basic question
instead of "char in[200]", use "int in[200]"
Re: how to make an int array? *basic question
just tried int in[200]; but it says in every [] i have 1 =\ that means that i either write to [] wrong or read from [] wrong nothing else?
Re: how to make an int array? *basic question
If you write "int in[200]", then all the values in the array should be initially set to zero.
Can you paste your code so I can get a better idea of what you are trying to do.
Re: how to make an int array? *basic question
figured out already default case was run after others and replaced all values with 1 =\ thx