by cppkid
Ok if you are doing in c++.
this is not particularly relevant to pantera but in case anyone else reads this thread i would like to point out that you would be better using c++ strings rather than c strings in c++ because they have nice operators defined for them, the code in c++ would become
Code:
#include <string>
using std::string;
void somefunc() {
string s1="its";
string s2="done";
s1+=(" "+s2);
}
if you do want to use c standard library header files in c++ then they should be prefixed with c and lose the .h, so #include <string.h> becomes #include <cstring>
finally for the c-string functions you should really use the n-versions as this will greatly help to reduce the chance of nasty things like buffer overflow.