0

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..

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by azwraith69
0

edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:

/* these names conflict with STL */
#undef box
#undef clear
#undef erase
#undef move
#undef refresh

Which in theory should fix your issue. I guess you could do something like this at the top of your code:

#define __cplusplus

should probably fix it, or even a simple #undef erase . Anyway, let me know if it works, or if I'm crazy.

0

edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:

/* these names conflict with STL */
#undef box
#undef clear
#undef erase
#undef move
#undef refresh

Which in theory should fix your issue. I guess you could do something like this at the top of your code:

#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!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.