Is it okay to use STL in my iPhone C++ 2d game?

  • Is it okay to use STL in my iPhone C++ 2d game? Ryan

    I've read a couple posts on the subject and it sounds hairy. But I think people are talking about using STL containers for Objective-C objects. I'm using pure C++.

  • Short answer: yes

    Long answer: depends on your use case. But probably yes.

Related questions and answers
  • When it comes to mobile game development on iOS and Android NDK, some developers write their own C++ containers, while others claim that STL is more than adequate for mobile game development (For example, the author of iPhone 3D Programming uses STL rather than Objective-C in his examples. His defense is that STL is no slower than Objective-C). Then there are also mobile developers who abandon C++ entirely and develop games entirely (or mostly) in the C language (C89/C90). What are the benefits and drawbacks of each approach?

  • that. All this seems well and good, except I have one question, why not linked lists rather than arrays? Sure, if you had to make your own linked list class, I would be on board, but in c++ anyway, assuming your using STL, you only need to declare the type as a list, rather than as a vector, and use iterators to loop over it, rather than looping an index. The advantages of using a linked list though... around and found this, which claimed that a lot of older developers didn't want to use STL because it wasn't mature enough. Also, older games AFAIK, used C rather than C++, which also doesn't have STL

  • (indicating structure begin, structures end, etc.) and strings in a custom-defined format. What i want to know specifcally is how to do this with the STL and C++... Since the format is meant...Hey so i just learned about the i/o part of the STL, more specifically fstream. Although I can now save binary info and classes i've made to the hard drive, i am not sure how to define how the info... to hold multiple classes and data in a single file have identifiable starts and ends to sections: such as the space in text files Maybe have it's own icon to represent it?? How do i do this in c++ ?

  • (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl_tree.h:1182 #3 insert (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl...I'm working on a 3d music visualizer using Ogre3d, basically it's a spectrum analizer, a lot like the old xmms plugin: It works well, the bars are drawn...-to-fix-ogre3d-segfault-with-std-rb-tree-insert-and-rebalance Backtrace: [email protected]:~/workspace/OgreVisualizer/Release$ gdb OgreVisualizer core GNU gdb (GDB) 7.2-debian Copyright (C) 2010 Free

  • ; // GOD DAMMNIT WINDOWS WHY???? #include <conio.h> // Ncurses #include<curses.h> // STL stuff #include <algorithm> #include <string> #include <vector> //String/Int conversion...;myStopwatch.h> // for keeping times #include <myMath.h> // numb_digits() and digit_val(); using namespace std; enum{ NUMB_LINES= 24, SEC= 1000}; // time stuff enum{TIME...}; // for the old/new screen command // Some nCurses setup int r = 0, c = 0; // current row and column (upper-left is (0,0)) const int nrows = 56, // number of rows in window ncols = 79

  • Is it possible to use OpenGL purely with C instead of C++? I am wanting to make sure there won't be any problems with my using C and not C++. OpenGL does not depend on any C++ libraries right?

  • ( 10.0f, 0.0f, 0.0f, 1.0f ); // z rotation Are my maths and approach correct, or am I completely wrong? Finally, I'm using the glm library with OpenGL / C++ for this. Is the order of x rotation...I'm attempting to create a 3d tree procedurally. I'm hoping that someone can check my vector rotation maths, as I'm a bit confused. I'm using an l-system (a recursive algorithm for generating... (and subsequent branches) - I'll "inherit" the rotation matrix of the parent branch, and apply x and z rotations to that also. e.g. using glm::normalize; using glm::rotateX; using glm::vec4; using glm::mat4

  • Every programming language has its standard library of containers, algorithms, and other helpful stuff. With languages like C#, Java, and Python, it's practically inconceivable to use the language without its standard lib. Yet, on many C++ games I've worked on, we either didn't use the STL at all, used a tiny fraction of it, or used our own implementation. It's hard to tell if that was a sound decision for our games, or one simply made out of ignorance of the STL. So... is the STL a good fit or not?

  • this summer and I have a good grounding on the web side of things. I've also done some very basic c++ (what i would consider basic). My c++ skills basically comes down to different tutorials on things that other languages are based on. E.g heres a lab sheet on containers, pointers, operator overloading or something from the STL. It was more a module to develop our analytical thinking than experience with c++. C++ was just the medium for learning. My opinion on the language? C++ is an amazingly diverse one size fits all language and its no surprise its around this long. My skills in it are basic

Data information