for (int i = 0; i<cnt;i++){ if (locate[i]='\0'){ cout << ""<<endl; } else { cout << locate[i] +1<<" "; }
bool empty = true; for( int i = 0; i < cnt; ++i ) { if( locate[i] != '\0' ) // probably want a comparison here { empty = false; cout << locate[i] +1<<" "; } } if( empty ) { cout << "locate is empty" << nl; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)