To quote Bjarne Stroustrup, "The better one knows C, the harder it seems to avoid writing C++ in C style." Definitions in the OpenGL Programming Guide (the Red Book) C: God's programming language. C++: The programming language of an alien deity. My own spin is that for a project written by a single programmer, C is easier. For a project written by multiple programmers in parallel, C++ is almost mandatory. However, that is a topic for a different thread. Relevant to this thread, does .size return something other than 8? If not, then why not?
Originally Posted by rtmistler
I don't know the exact code syntax, but C++ is eminently better qualified to manage lists and arrays; similarly is python. For instance, just me tossing it out having not checked, you have a list declared, you also have methods for it such as .size() or .length(), I believe it would be .size() where that will give you an integer representation of the size of the list. Further, the greater part of C++ is that things like String types or something similar; classes actually; allow you to declare something as a String class or list of String classes and not worry about pre-declaring the dimensions. So you might want to keep what you do have, but look a bit at some of the available C++ classes you could use.
And to note further, gcc on a general Linux system should be able to deal with C++ code. Not sure if you're working on that type of platform, but just pointing that detail out.