[LC++]curses and vectors

Jack Lloyd lloyd at acm.jhu.edu
Wed Jul 25 07:48:13 UTC 2001

> Curses/ncurses has a macro called "erase" in it. It erases a curses
> window. Vectors (STL) also have a member called "erase", which erases
> objects held in the vector. My problem is that I'm using both in my
> program, and when I compile, I get a variety of errors, all of which are
> a variation on: "...arguments given to macro 'erase'". So the one is
> stepping on the other.
> Anyone have any idea how to avoid this problem?

I believe that if you #undef the erase macro you'll be able to use the
normal function definition (werase(stdscr), I think) without these

Macros suck.

More information about the tuxCPProgramming mailing list