Hi, i am with problems in library chrono, because when put within of the fuction switch, appear a messenger of error, look of the picture. Sorry for my engilsh!!! My english is a trash!!!
int main()
{
int i = 7 ;
switch(i)
{
case 3 :
// ...
case 1 :
int j = 25 ;
++j ;
// ...
break ;
case 7 : // *** error: cannot jump from switch statement to this case label
// *** error: jump bypasses initialisation of 'int j'
;
// ...
}
if( i < 10 ) goto label ; // *** cannot jump from this goto statement to its label
int k = 6 ;
++k ;
label: ; // // *** error: jump bypasses initialisation of 'int k'
}
int main()
{
int i = 7 ;
switch(i)
{
case 3 :
// ...
case 1 :
{
int j = 25 ; // j is now at a local block scope
++j ;
// ...
} // which ends here
break ;
case 7 :
;
// ...
}
int k = 6 ; // initialisation of k is now before the jump
if( i < 10 ) goto label ;
// int k = 6 ;
++k ;
label: ;
}