map decleration leads to syntax error in vc7 
Author Message
 map decleration leads to syntax error in vc7

Hi everybody
This is very weird - the following lines pass compilation
in vc6 but not in vc7:

typedef map<wstring, ElementHandler*> Str2ElementHandler;
Str2ElementHandler m_rules;

I get:
c:\Program Files\Microsoft Visual Studio .NET\Vc7
\include\xtree(1129): error C2059: syntax error : '('

Any suggestions?



Sun, 02 Jan 2005 16:59:42 GMT  
 map decleration leads to syntax error in vc7


Quote:
> Hi everybody
> This is very weird - the following lines pass compilation
> in vc6 but not in vc7:

> typedef map<wstring, ElementHandler*> Str2ElementHandler;
> Str2ElementHandler m_rules;

> I get:
> c:\Program Files\Microsoft Visual Studio .NET\Vc7
> \include\xtree(1129): error C2059: syntax error : '('

How do you define ElementHandler?

This program compiles without any problem on my VC7:

#include <map>
using namespace std;
struct ElementHandler {int a;};
int main()
{
  typedef map<wstring, ElementHandler*> Str2ElementHandler;
  Str2ElementHandler m_rules;
  return 0;

Quote:
}

// Luc


Sun, 02 Jan 2005 17:13:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Vc7 map compile error from xtree

2. VC7 std::map compilation error

3. vc7 std::map compilation error

4. VC7 Error C2535 with silly map typedef

5. What is the syntax of a MAP file ?

6. Syntax of MS VC++ 6.0 map files

7. STL-maps and -sets on VC7

8. map destruction in debug more with VC7

9. Memory leak? (std::map, VC7)

10. stl map iterator corrupted in dll using vc7 .net

11. STL-maps and -sets on VC7

12. Error C2061: Syntax Error

 

 
Powered by phpBB® Forum Software