|
-
Dec 8th, 2000, 09:28 AM
#1
Thread Starter
transcendental analytic
I know how to create fixed arrays, and i've read there are a bunch of array classes out there but i don't know which to use. I need an array that is capable of (ordered by priority):
1. fast access
2. no extra memory (like arrays of pointers)
3. adding/removing single items, clearing
4. resizing
Also i would like a short summary of what array classes are good for what thanks
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 8th, 2000, 01:56 PM
#2
Addicted Member
ApString all the way
There are a few good ones. If you want a data array I would recommend APVector. The header can be found by a yahoo search easily. If you want multi-dimensions, APMatrix is good for matrices. If you want a good String header, APstring is great. All of these are completely dynamic. I've been working with them extensively lately. Also you can get and edit single indexes by just using there index value. Check them out. Wow, I was able to help Kedaman(*sniff, im so proud)
-
Dec 8th, 2000, 03:11 PM
#3
Monday Morning Lunatic
Check out the STL classes. They're very good, and fast.
You'd need vector, string, list among others. SGI's developer site has loads of info and documentation. They come with VC++, by the way.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 8th, 2000, 07:32 PM
#4
Thread Starter
transcendental analytic
Thanks you parksie and Chris I'll try those, wheres the SGI's developer site? BTW, i have just single dimensioned arrays and I have a somewhat complex architecture of arrays in arrays, so i was wondering if there is something for hierarchy of arrays?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 9th, 2000, 05:34 AM
#5
Monday Morning Lunatic
A vector of a vector. 
Code:
vector<vector<int> > TwoDArray; // Remember the space...
That space between the two >'s is important, otherwise the compiler thinks it's >> .
The STL is at: http://www.sgi.com/Technology/STL/index.html
You shouldn't need to download it, but the docs are useful.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 10th, 2000, 01:57 PM
#6
Thread Starter
transcendental analytic
Thanks parksie
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|