#Need to get char from string
10 messages · Page 1 of 1 (latest)
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.
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;
You're saying that a char pointer (str) should be equal to a char.
The one's a character, the ones a memory location. Ofc that can't work.
Also your scanf call is wrong, also never use scanf, especially when you're only trying to get some text input: http://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html