Yeah - so you need to link in this but they'll be a link error you need to comb this forum for to fix.
In that OOP for DarkGDK thread, started by AndrewT, I released a swath of code, and in there there is a class called
jfc_ar.
It doesn't allow multi-dimentioned arrays, but you could emulate one. It's basically a dynamic Array - but the Array you use itself, unlike vector, is not a template class. The array is of the INT data type. But I chose INT becuase... well for ints
but you can type cast it to a pointer because its 32 bits. (If you want to go 64bit this would need to be changed - easy enough) but you can also type cast it to a float seeing how it is 32 bits.
Need a double array? Then I would personally start with an instance of the calss. Then in each:
I would create another MyArray class like this:
MyArray->ar[iIndex] = (int)new JFC_AR();
I know its a little funky, but I don't personally mind because the code is so lean its pretty dang fast. It looks funky maybe, but it pretty much compiles down to the same memory address pointer math as a regular array... in fact.. it is. An Array of Arrays is not much different.
However to learn proper C++ - meaning mainstream - you're correct the vector.h class is what you probably want. All the stuff you'll run into is the same stuff I ran into most likely... NEED dynamic Arrays! Need to manage objects, need to write strings to the screen... etc etc.
AndrewT has a OOP library that is rather well coded and less a headache than trying to sort through my 90+ source files.
Also I think Diggsey is releasing some OOP library also - I think he mentioned he's charging for it... like $5.00US or 5 pounds euro or whatever they use.
Also learn the difference between the double linked lists and vectors because there is a time and place for both... though let me start by saying (as I was reminded) that arrays are usually what in a game because you load em up - thenn play. For CONSTANT deleting/adding... you either use the array and try to manage whats empty and what's not yourself, or let the array class you're using do it - but I recommend the former as the array classes - mine included, need to allocate more memory, copy all the data, then free the old data when the size change exceeds the "Allocation Chunk"... or you may ask for one array element but the class may allocate 10. when you try to add the 11th, thats when it allocates TWO chunks, copies what ya have, then deletes the old memory chunk that had your values. These can cause a slight hiccup in smooth gameplay. Depends how much data etc.
No - nothing is simple - you should hit the www.cplusplus.com website, welcome to DarkGDK... note it took me awhile before I started getting results like I could in DarkBasic. Now I'm glad I hunkered down and learned it.