curses problem

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jul 2008
Posts: 21
Reputation: azwraith69 is an unknown quantity at this point 
Solved Threads: 0
azwraith69's Avatar
azwraith69 azwraith69 is offline Offline
Newbie Poster

curses problem

 
0
  #1
Feb 22nd, 2009
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..
I am living in a mere program...
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: curses problem

 
0
  #2
Feb 22nd, 2009
edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:
  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:
  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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 21
Reputation: azwraith69 is an unknown quantity at this point 
Solved Threads: 0
azwraith69's Avatar
azwraith69 azwraith69 is offline Offline
Newbie Poster

Re: curses problem

 
0
  #3
Feb 22nd, 2009
Originally Posted by Comatose View Post
edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:
  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:
  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!
I am living in a mere program...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC