E
exander77
I am quite new to c++, about half of a year.
I juct wonder, why such code is not possible:
int chlen(char * ar) {
for(int i=0;ar||return i;i++);
}
In my opinion, it would be much "cuter" than this:
int chlen(char * ar) {
int i;
for(i=0;ar;i++);
return i;
}
Is there a reason, why return cound't be used as part of condition
(with true result, but interruptiong the function/program, so it is
not important).
eXander
I juct wonder, why such code is not possible:
int chlen(char * ar) {
for(int i=0;ar||return i;i++);
}
In my opinion, it would be much "cuter" than this:
int chlen(char * ar) {
int i;
for(i=0;ar;i++);
return i;
}
Is there a reason, why return cound't be used as part of condition
(with true result, but interruptiong the function/program, so it is
not important).
eXander