VS2008 C++ Compiler error?

c++, constructor, initialization, variable-assignment

Solution

The first compiles because the assignment operator is called what has one signature of "string& operator= ( char c )" and the compiler can convert 1 into a char.

The second won't compile because it calls the copy constructor which has no compatible signature.

Problem

this compiles :-) ``` string name; name = 1; ``` this does not: ``` string name = 1; ``` any thoughts? I know that this is wrong. . . that is not the point. The first gives a smiley face.

Original source