CMap issue when converting project from VS6 to VS2008
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: CMap issue when converting project from VS6 to VS2008

  1. #1
    Join Date
    Dec 1999
    Posts
    85

    CMap issue when converting project from VS6 to VS2008

    Hi,

    I'm converting a large project to VS2008 from VS6 and i'm getting a strange template problem on VS2008 only, hope someone can help.

    I have an include file which has the line:-
    class CMap;

    but when I compile in VS2008 i get error:-
    error C2990: 'CMap' : non-class template has already been declared as a class template

    It is been used in other includes no problem.

    if I take that line out 'class CMap;' then I get error:-
    error C2955: 'CMap' : use of class template requires template argument list


    Any ideas on how to fix this?

    Thanks,
    Hobnob

  2. #2
    Join Date
    Dec 1999
    Posts
    85

    Re: CMap issue when converting project from VS6 to VS2008

    fixed it! put class CMap; before that line of header code and now it works. weird.

    hobnob

  3. #3
    Join Date
    Apr 1999
    Posts
    27,427

    Re: CMap issue when converting project from VS6 to VS2008

    Quote Originally Posted by hobnob View Post
    fixed it! put class CMap; before that line of header code and now it works. weird.

    hobnob
    It isn't a real fix until you know exactly the reason for that line of code being there. Otherwise you may have other "fixes" being done that make no sense code wise (and C++ wise), and you wind up with a mess on your hands.

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center