L
Lingyun Yang
Hi every one,
I am a newbie in C++ and have some experience in C.
My program always seems like a mixture of C and C++,
especially when dealing with string. sometimes I use
std::string but I have some difficult on controlling it
for example:
// format the string as what I like
sprintf(s, "%s%d",buf,i )
I don't know how to do it in std::string in C++
1. Any suggestion about what kind of material I should read
online or book will both be good.
another problem is when I use string under gcc 2.9.*
sometimes met compile error like
<char> ......(I don't remember clearly, but no such problem in
the newest gcc compiler)
so,
2. what about the different gcc version's support of c++ standard ?
I am a newbie in C++ and have some experience in C.
My program always seems like a mixture of C and C++,
especially when dealing with string. sometimes I use
std::string but I have some difficult on controlling it
for example:
// format the string as what I like
sprintf(s, "%s%d",buf,i )
I don't know how to do it in std::string in C++
1. Any suggestion about what kind of material I should read
online or book will both be good.
another problem is when I use string under gcc 2.9.*
sometimes met compile error like
<char> ......(I don't remember clearly, but no such problem in
the newest gcc compiler)
so,
2. what about the different gcc version's support of c++ standard ?