wired problem

This is a discussion on wired problem within the C++ Programming forums, part of the General Programming Boards category; Here is my source code http://gist.github.com/18355 everything works nice if the ParamsMap Class is not present. When it compiles ParamsMap ...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    219

    wired problem

    Here is my source code http://gist.github.com/18355 everything works nice if the ParamsMap Class is not present.

    When it compiles ParamsMap compiler fires error from ParamsMapCore

    Code:
    compiling paramsmap.cpp (g++)
    paramsmap.h:34: error: invalid use of incomplete type 
      'class ParamsMapCore<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Var>'
    paramsmapcore.h:30: error: declaration of 
      'class ParamsMapCore<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Var>'
    paramsmap.cpp:22: error: type 
      'ParamsMapCore<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Var>' 
      is not a direct base of 'ParamsMap'
    I am using gcc

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I would imagine you aren't getting your definition of Var in at an appropriate time.

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    219
    So whats the solution ?? How would I solve it ?

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Could you copy and paste the code you are using? Var is a template parameter. I do not know what you are plugging into the template.

  5. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    219
    all my source codes are there.which class you arenot able to find ?
    Var is at the bottom

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I don't see an issue. Are your files split up correctly?

  7. #7
    Registered User
    Join Date
    Jun 2007
    Posts
    219
    ok Here is my sourcecode archived please extract it and test.

    removing paramsmap.h and paramsmap.cpp from makefile.am compiles but when these two files are present it doesn't compile.

    there are kdevelop project files too that you can use if you have kdevelop installed.

    http://rapidshare.com/files/156500197/filter.tar.gz

  8. #8
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Remove the forward declarations. You include the respective files anyway, and furthermore you need the complete types.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21