Take a look at C, but don't go too deep. If you ever thing using any of the strxxx functions or char*s as strings, you've gone too far.
This is horrible advice
Maybe the advice comes from the fact that working with strings in C is a pain the the butt compared to using std::string. It might be a tad less efficient, but it's much less memory error prone.
I stopped counting the cases of "Person A made a 'clever' C string processing routine, Person B changed the functionality and introduced some kind of corruption because he wasn't as clever as person A. And then Person C runs into that actual bug."
Ofcourse, this is made worse with the C string functions losing their "const correctness", like:
char * strchr ( const char *, int );
So:
strchr("ABC", 'B')[0] = 'X';
printf("ABC");
Will:
- Not compile in C++, but compiles fine in C.
- Might crash, print "ABC" or print "AXC", depending on your compiler and target platform.