Click here to Skip to main content
15,908,455 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
toxcct16-Jan-06 2:51
toxcct16-Jan-06 2:51 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
#realJSOP16-Jan-06 3:11
professional#realJSOP16-Jan-06 3:11 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
toxcct16-Jan-06 3:17
toxcct16-Jan-06 3:17 
AnswerRe: VS2005 - compiler bug with CStrings? Pin
kakan16-Jan-06 3:25
professionalkakan16-Jan-06 3:25 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
#realJSOP16-Jan-06 10:52
professional#realJSOP16-Jan-06 10:52 
AnswerRe: VS2005 - compiler bug with CStrings? Pin
Nish Nishant16-Jan-06 3:50
sitebuilderNish Nishant16-Jan-06 3:50 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
#realJSOP16-Jan-06 11:01
professional#realJSOP16-Jan-06 11:01 
GeneralRe: VS2005 - compiler bug with CStrings? Pin
Nish Nishant16-Jan-06 11:47
sitebuilderNish Nishant16-Jan-06 11:47 
John Simmons / outlaw programmer wrote:
Where do I find out if it's a unicode build? Actually, I think non-unicode would make my life easier...


Sorry John, the issue with explicit constructors I mentioned does not apply to your case.

And anyway, your code is not a Unicode build, since the CString accepted the non-Unicode string (in a Unicode build you'd have been forced to specify an L"..." or use the _T macro)

Also I tested out the following code on my VC++ 2005 and got the correct results.

void MyFunction(CString sVal)
{
	if (sVal.IsEmpty())
	{
		AfxMessageBox("Empty String");
	}
	else
	{
		AfxMessageBox(sVal);
	}
}

void ThisFunction()
{
	CString myString = "test";
	MyFunction(myString);
}


That code snippet message boxed "test" as expected. So, my best guess is that something happens before the CString gets to MyFunction.

Regards,
Nish


QuestionMove / Refresh Windows Taskbar Pin
u6ik16-Jan-06 1:42
u6ik16-Jan-06 1:42 
AnswerRe: Move / Refresh Windows Taskbar Pin
u6ik16-Jan-06 20:41
u6ik16-Jan-06 20:41 
Questionhow can i calculate the length of sent data at server side Pin
baldha rakesh16-Jan-06 1:37
baldha rakesh16-Jan-06 1:37 
AnswerRe: how can i calculate the length of sent data at server side Pin
Bob Flynn16-Jan-06 2:39
Bob Flynn16-Jan-06 2:39 
GeneralRe: how can i calculate the length of sent data at server side Pin
baldha rakesh16-Jan-06 17:15
baldha rakesh16-Jan-06 17:15 
GeneralRe: how can i calculate the length of sent data at server side Pin
Bob Flynn17-Jan-06 3:09
Bob Flynn17-Jan-06 3:09 
QuestionText Boxes in C++ Pin
Gktony16-Jan-06 0:45
Gktony16-Jan-06 0:45 
AnswerRe: Text Boxes in C++ Pin
_AnsHUMAN_ 16-Jan-06 1:01
_AnsHUMAN_ 16-Jan-06 1:01 
AnswerRe: Text Boxes in C++ Pin
Owner drawn16-Jan-06 1:10
Owner drawn16-Jan-06 1:10 
GeneralRe: Text Boxes in C++ Pin
toxcct16-Jan-06 1:18
toxcct16-Jan-06 1:18 
GeneralRe: Text Boxes in C++ Pin
Owner drawn16-Jan-06 1:19
Owner drawn16-Jan-06 1:19 
AnswerRe: Text Boxes in C++ Pin
Eytukan16-Jan-06 2:32
Eytukan16-Jan-06 2:32 
AnswerRe: Text Boxes in C++ Pin
Gktony16-Jan-06 3:13
Gktony16-Jan-06 3:13 
GeneralRe: Text Boxes in C++ Pin
toxcct16-Jan-06 3:24
toxcct16-Jan-06 3:24 
QuestionAccessing Namespace in other class Pin
romuzu16-Jan-06 0:42
romuzu16-Jan-06 0:42 
AnswerRe: Accessing Namespace in other class Pin
Owner drawn16-Jan-06 1:11
Owner drawn16-Jan-06 1:11 
Questionhow to use thread Pin
cancerion16-Jan-06 0:31
cancerion16-Jan-06 0:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.