B
Brett Robichaud
What is the correct way to allocate a string:iterator using a char*
buffer? In Visual C++ 7.1 the following works fine (where pBuf is a
char*):
std::string::iterator start = pBuf;
But under gcc 3.2.3 for RedHat linux it's not. I get an error like
this:
XmlParser.h:775: conversion from `char*' to non-scalar type
`__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >' requested
I assume I'm using some compiler dependent features of STL and I'd
like to know the correct generic way to do this.
Can anyone help?
-Brett-
buffer? In Visual C++ 7.1 the following works fine (where pBuf is a
char*):
std::string::iterator start = pBuf;
But under gcc 3.2.3 for RedHat linux it's not. I get an error like
this:
XmlParser.h:775: conversion from `char*' to non-scalar type
`__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >' requested
I assume I'm using some compiler dependent features of STL and I'd
like to know the correct generic way to do this.
Can anyone help?
-Brett-