Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 5 and Version 6 of code/FAQ


Ignore:
Timestamp:
Sep 25, 2008, 1:59:18 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/FAQ

    v5 v6  
    4343std::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.
    4444
     45=== Why not using const char*? ===
     46Trust 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
    4548=== What is std::list / std::set / std::map / std::vector / std::stack / std::queue / std::pair? ===
    4649All 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... ===
     52They 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.