Strings in C++ end up as character arrays (from my experience). therefore, unless you are trying to make this a null string (in which case you should use ""; or null;) you generally want to surround your input with quotes as @nphuongsun93 stated previously. (which would make your right hand side be "0";)