Hi Guys
I wrore a simple VC "single document" interface program with MS VS_2005
when i wrote the following code

Code:
void CFirstView::OnDraw(CDC* pDC)
{
	CFirstDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;
      CString hello_string="Hi This is my 1st Document View";
	// TODO: add draw code for native data here
	pDC->TextOutW(0,0,hello_string,hello_string.GetLength());
	
}
and copiled my program i get the error message below

Code:
c:\documents and settings\falcon eyes\my documents\visual studio 2005\projects\first\first\firstview.cpp(54) 
:error C2440:'initializing' : cannot convert from 'const char [32]' to 'ATL::CStringT<BaseType,StringTraits>'
1>with
1>[
1>BaseType=wchar_t,
1>StringTraits=StrTraitMFC_DLL<wchar_t>
1>]
1>Constructor for class 'ATL::CStringT<BaseType,StringTraits>' is declared 'explicit'
1>with
1>[
1>BaseType=wchar_t,
1>StringTraits=StrTraitMFC_DLL<wchar_t>
does any one know why i'm getting an error message and what's the solution

Last edited by shabbir; 15Apr2007 at 08:34.. Reason: Code formating.