943,600 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 516
  • C++ RSS
Feb 22nd, 2009
0

curses problem

Expand Post »
i have a problem with curses

my program is working properly, but when i include curses.h,
it produces errors i can't understand..

classmates.erase(classmates.begin() + i); and the error is:
macro "erase" passed 1 arguments, but takes just 0
and statement cannot resolve address of overloaded function

if i remove curses.h, the program compiles..

thx for helping..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
azwraith69 is offline Offline
21 posts
since Jul 2008
Feb 22nd, 2009
0

Re: curses problem

edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:
C++ Syntax (Toggle Plain Text)
  1. /* these names conflict with STL */
  2. #undef box
  3. #undef clear
  4. #undef erase
  5. #undef move
  6. #undef refresh
Which in theory should fix your issue. I guess you could do something like this at the top of your code:
C++ Syntax (Toggle Plain Text)
  1. #define __cplusplus
should probably fix it, or even a simple #undef erase. Anyway, let me know if it works, or if I'm crazy.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Feb 22nd, 2009
0

Re: curses problem

Click to Expand / Collapse  Quote originally posted by Comatose ...
edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:
C++ Syntax (Toggle Plain Text)
  1. /* these names conflict with STL */
  2. #undef box
  3. #undef clear
  4. #undef erase
  5. #undef move
  6. #undef refresh
Which in theory should fix your issue. I guess you could do something like this at the top of your code:
C++ Syntax (Toggle Plain Text)
  1. #define __cplusplus
should probably fix it, or even a simple #undef erase. Anyway, let me know if it works, or if I'm crazy.
thx! it works, although im afraid my codes are not portable now..

thx again!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
azwraith69 is offline Offline
21 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help with Binary I/O
Next Thread in C++ Forum Timeline: C++ Factorization





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC