From: David K. <dknez@MIT.EDU> - 2009-12-17 18:13:55
|
Roy Stogner wrote: > > Can you get the same behavior from a simple test case? > > #include <cstring> > int main(void) > { > strncpy(NULL, NULL, 0); > } > > That ought to compile, at least. This compiles for me, but it doesn't compile when I change <cstring> to <string>, which seems consistent with the error I reported before. > What compiler version are you using? I'm using Ubuntu 9.10, gcc --version gives gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1 Derek Gaston wrote: > Ok - the right thing (according to my compiler guru) is to include _both_ <string> and <cstring>. > > Changing <string> to <string.h> you won't pick up std::string (although you probably got lucky and picked it up through another #include somewhere else). > This works for me... - Dave |