We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
ive got this code and some works but this is the problem
tryagin: if ( *var1 == 22 && *var2 == 75 ) goto end;
goto tryagin;
what is wrong?
You didn't specify how the actual behavior of the code differs from your expectation, so the diagnosis of the problem is a bit difficult.
Unless the two pointers point to a volatile data type, the compiler can optimize out all but the first access to the variables.
Some other, minor issues are:
1. The possibility of an endless loop. If the condition is never met, is it okay if the program just sits there for all eternity, waiting?
2. Unnecessary use of a goto - a while()-loop could do the same job here.