Why ,
int max = 5;
pz int [ 5] = {value 1 , value 2 , .. , ...., .... 5 } ;
no error occurs .
but
if I put the variable in the hooks of the table , it shows me an error ?
int max = 5
pz int [Max ] = { 0,0,0,0,0 } ;
I do not understand. thank you all for helping me .
What happens if you use a lower case 'M' for the data definition?
always error/
// int a = 0, b = 0, c = 0, d = 0, e = 0, h = 0, push = 0, cont = 0;
// int code = 0;
int maxi;
pz int [maxi] = (5,5,2,2,3,1,1); // ' maxi' Must be set to the number of pz box
I try to reformulate my code, with tiny, but nothing was done.
pz int [maxi] = (5,5,2,2,3,1,1); // ' maxi' Must be set to the number of pz box
Shouldn't this be
int pz[maxi] = (5,5,2,2,3,1,1); // ' maxi' Must be set to the number of pz box
and shouldn't maxi have a value defined ?
@UKHeliBob: Not only that, but braces are needed instead of parentheses, too:
int maxi = 7;
int pz[maxi] = {5,5,2,2,3,1,1}; // ' maxi' Must be set to the number of pz box
guix
7
Also you don't need to hardcode the value of 'maxi', you can calculate it easily:
int pz[] = {5,5,2,2,3,1,1};
int maxi = sizeof( pz ) / sizeof( pz[0] );
Hello everyone,
thank you for your action. and desolated for not having replied earlier, I fell in pc down.
I solved my problem .
that I can not put the variable in pz max , it's just that when I put her does not take the calculation.
thank you to you all for your aide. i hope to do the same one day . See you soon.
system
9
We do have a francophone section.