Where m_Output and m_Hostname are CString variables.
The compiler error is this:
1>c:\documents and settings\administrator\my documents\visual studio 2005\projects\router monkey\router monkey\router monkeydlg.cpp(169) : error C2679: binary '+' : no operator found which takes a right-hand operand of type 'const char [2]' (or there is no acceptable conversion)
1> e:\visual studio 8\vc\atlmfc\include\atlsimpstr.h(666): could be 'ATL::CSimpleStringT<BaseType> ATL::CSimpleStringT<BaseType>:perator +(const ATL::CSimpleStringT<BaseType> &,const ATL::CSimpleStringT<BaseType> &)' [found using argument-dependent lookup]
Anyone know why this error is happening and how i can fix it ?
I can't get from where the 'const char [2]' come from but that should work if you build for MBCS. Try this
Code:
m_Output=m_Hostname+_T("and");
instead
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
I haven't done any windows programming for quite a long time now but if I don't remember wrong you use \r in an edit box. Also make sure it's a multi line enabled edit box.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
Beside the fact that your edit control must be multi-line (have ES_MULTILINE style set) you have to use "\r\n" (CRLF, "carriage return" and "line feed" / "new line") for line delimiter.
Should have looked that up instead of relying on my bad memory...
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
Bookmarks