NCurses and Standard Template Library String Containers

bridged with qdn.public.devtools
Post Reply
Nathan Stokes

NCurses and Standard Template Library String Containers

Post by Nathan Stokes » Fri Jul 11, 2003 4:08 pm

I am using Momentics 6.2.1 with the standard libraries. I am linking
against the GNU libraries with exceptions. I am having problems compiling a
bit of code which I am using ncurses <ncurses.h> and std::string <string>.

when i try to do the following:

assume std::string::myString; is declared as a member variable of a class

in a member function of declared class I attempt to do

myString.erase(myString.end()); //erase the last character of the string
using the end iterator.


i get the following error from the compiler error
C:/QNXsdk/workspace/VMEDebug/vmedebug.cpp:1927: arguments given to macro
`erase'
the headers are included in the following order in the class declaration
file
#include <hw/inout.h>
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <vector>
#include <ncurses.h>
#include <sys/mman.h>
#include "vapi.h"
#include "stdtypes.h"

Nathan

Post Reply

Return to “qdn.public.devtools”