Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Not recognized identifier

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
znakeeye Posted - Jan 13 2009 : 06:46:27 AM
VAX 1649, VS 2008 SP1. In certain scenarios CStringT::CompareNoCase is not recognized, and becomes underlined:
class CStarterInfo : public CCommandLineInfo
{
public:
	CStarterInfo() {}
	virtual ~CStarterInfo() {}

	virtual void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
	{
		CString strParam(pszParam);
		if (0 == strParam.Left(7).CompareNoCase("config="))
			m_strConfig = strParam.Mid(7);
	}

	CString				m_strConfig;
};
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jan 14 2009 : 6:18:50 PM
Thanks for your help. I have put in a bug report for this:

case=22866

I was able to compile your example by unchecking "Use unicode libraries" in the new MFC Application wizard.
znakeeye Posted - Jan 14 2009 : 03:09:20 AM
Just create an MFC project and choose "Multibyte character"-configuration. CString and CCommandLineInfo are part of MFC.
accord Posted - Jan 13 2009 : 7:08:42 PM
Your example actually does not compile. I do not have experience with CString (I use my own class for string), so can you help me, how to get this compiled?

I created an empty class for CCommandLineInfo:

class CCommandLineInfo {};

and included the necessary header:

#include <atlstr.h>

but get this error message:
error C2664: 'ATL::CStringT<BaseType,StringTraits>::CompareNoCase' : cannot convert parameter 1 from 'const char [ 8]' to 'const wchar_t *'

Maybe I need to #define something or to use a compiler directive?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000