Deleting an unused variable makes my code seg fault....

@matrix you're already corrupting somewhere the stack and the unused variable is just accidentally saving you from the effects of that.

@apropos
In C, can I have an array of strings and then do strcpy into it like strcpy(strings[i], str)?

@matrix @apropos if you have adequate space in the destination buffer, then yes. Also don’t forget about the null terminator.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.