This doesn't work as I'd expect it to. Obviously I'm doing something wrong, but I can't see it. Please can someone give me a nudge.
Code extract:
Code:char *article[] = { " the ", " a ", " some ", " any " }; const int size = 50; char sentence[ size ]; int number; for ( int i = 0; i < size; i++ ) sentence[ i ] = ' '; for ( int i = 0; i < 20; i++ ) { number = rand() % 3; cout << sentence << '\n'; strcat( article[ number ], sentence ); cout << sentence << '\n'; for ( int j = 0; j < size; j++ ) sentence[ j ] = ' '; }



LinkBack URL
About LinkBacks


