Changes between Version 5 and Version 6 of code/FAQ
- Timestamp:
- Sep 25, 2008, 1:59:18 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/FAQ
v5 v6 43 43 std::string is part of the C++ standard. It's more than just a char array: It provides several useful functions, is much easier, more flexible and more safe. But this is not Java, so you will still get a crash if you access a char outside the range of the string. Read the [http://www.cplusplus.com/reference/string/string/ reference] for more information. 44 44 45 === Why not using const char*? === 46 Trust me, you really don't want to do this. [wiki:FAQ_coding#Whatisstd::stringandwhatshouldIknowaboutit std::string] is SO much easier, it's like day and night. Or like heaven and hell if you excuse the sanctimoniousness. 47 45 48 === What is std::list / std::set / std::map / std::vector / std::stack / std::queue / std::pair? === 46 49 All those are STL containers. They're part of the C++ standard and available on every system. Read the [wiki:howto/STL page about STL usage] for help and more information. 50 51 === Why should I use STL containers? They're so weird... === 52 They might look complicated, but as you get used to them, they'll be your friends. Everyone knows STL containers, so no one will missunderstand your code. They're powerful and bug free and are well [http://www.cplusplus.com/reference/stl/ documented]. Please don't implement your own list for every chickenshit.