but the compiler said that
c:\users\danny\documents\visual studio 2010\projects\snow\snow\main.cpp(9): error C2446: '!=' : no conversion from 'const char *' to 'int'
1> There is no context in which this conversion is possible
1>c:\users\danny\documents\visual studio 2010\projects\snow\snow\main.cpp(9): error C2040: '!=' : 'int' differs in levels of indirection from 'const char
Line 9: You're trying to compare a char with a char array. *str points to a single character. The right side (" ") is a character array. As the compiler stated, there is no implicit comparison between a character and a character array. You want to compare to a single character.