i have the following call to strcpy
i expected it to print out a w to the screen but instead i got -8714Code:strcpy(colour_piece_to_take, current_player ? "w" : "b"); printf("%s\n", colour_piece_to_take);
what is going on??
coop
i have the following call to strcpy
i expected it to print out a w to the screen but instead i got -8714Code:strcpy(colour_piece_to_take, current_player ? "w" : "b"); printf("%s\n", colour_piece_to_take);
what is going on??
coop
When faced with some weirdness like this, what I'd do is to write a tiny program containing just this along with the necessary declarations, then compile and run it to see what I get. (It's basically the technique described in my signature below.)
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
the issue was im a complete idiot and i typed %d not %s as i didn't cut and paste it didn't transfer across..... it now says w as it should. however i have used your char* p_label trick and all is smiles and roses