Dealing with strings

Started by
9 comments, last by pdstatha 22 years, 3 months ago
just always use namespace std and it will work. When using string don''t use any of those C functions like strcpy, strlen, etc... use the methods of the class. Anything that you don''t find as part of the class will be in algorithm. Oh and due to a mistake fstreams do take char* instead of strings in their constructors. Fortunately the string class has a method c_str() which will return one.

This topic is closed to new replies.

Advertisement