This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how do i get to_string to work


Hi Ben,
On Sat, Oct 16, 2010 at 12:40:36PM +0100, Benjamin Czaczkes wrote:
> this is the message I get
> D:\Doc\2011\76635\proj\Q1\main.cpp:9: error: 'to_string' is not a member of 'std'
This message tells you, that you try to access a function / variable
"to_string" from the namespace "std", but which is not known to the
compiler when the compiler reads your file.

Probably the error is that you did not include a necessary header file
(which contains the declaration of this function)? 
Beside that: I don't know a function "to_string" defined in the standard
library -- maybe you wanted to call the member function "to_string" of a
bitset? Then (for a bitset "b") you would have to write "b.to_string()"
instead.

Could you provide a full compilable example (as short as possible) of
your code, which reproduces the error? Then we can really tell whether
it is a mistake in your code oder in g++ or....

Axel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]