469,347 Members | 6,633 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

How to use "typedef CString" in .net?

Hi, there,

I am going to use a command line parser class, which works well in VC6.0, in
VC++7.1. However error message such as "C2059: syntax error :')'", and
"C2061: syntax error : identifier 'CCmdLineParser_String'", and "C2061:
syntax error : identifier 'LPCTSTR'" shows in compiling. What is the
problem? Following is the header of the class:

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef CString CCmdLineParser_String;
#include <map>
using std::map;

class CCmdLineParser {
public:
class CValsMap : public map<CCmdLineParser_String, CCmdLineParser_String> {};
typedef CValsMap::const_iterator POSITION;
public:
CCmdLineParser(LPCTSTR sCmdLine = NULL, bool bCaseSensitive = false);
virtual ~CCmdLineParser();
....................................
}

And following is the header of my main program:

#include "stdafx.h"
#using <mscorlib.dll>
#include "cmdlineparser.h" // for using of the command line parser class
using namespace System;

int _tmain(int argc, char* argv[]){
......
}

Thanks in advance!

Gary

Nov 17 '05 #1
0 1487

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Fao | last post: by
6 posts views Thread by hercules | last post: by
1 post views Thread by Thomas Barnet-Lamb | last post: by
134 posts views Thread by jacob navia | last post: by
8 posts views Thread by Mohammad Omer Nasir | last post: by
8 posts views Thread by cman | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.