#Need to get char from string

10 messages · Page 1 of 1 (latest)

lone socket
#

I want to input a string that's 2 characters long and then assign the 2 chars to 2 variables

tidal juncoBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

lone socket
#

This is what I have done but I get this error: warning: initialization of 'char *' from 'char' makes pointer from integer without a cast [-Wint-conversion] char *str = a;

sick flax
lone socket
#

So something like this?

#

But now I just get nothing and if at print I write %s instead of %c I get (null)

#

oh no wait im dumb

#

!solved

tidal juncoBOT
#

Thank you and let us know if you have any more questions!

#

[SOLVED] Need to get char from string