What is the safest way to pass strings around in C?
- by chucknelson
I have a program in C using Solaris with VERY ancient compatibility it seems. Many examples, even here on SO, don't work, as well as lots of code I've written on Mac OS X.
So when using very strict C, what is the safest way to pass strings?
I'm currently using char pointers all over the place, due to what I thought was simplicity. So I have…