Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
C++ Data Structures multiple differ
Name: krisreid Date: September 30, 2004 at 16:17:31 Pacific OS: XP CPU/Ram: 1.8 1024
Comment:
In java you have the Object data type so you can store an array of Objects then cast them to the object you want when you pull them out.
I want to do the same kind of thing in c++. I need a data structure, anything will do, that can hold an unknown number of unknown objects.
Name: egkenny Date: September 30, 2004 at 19:39:19 Pacific
Reply:
You might want to look at the C++ STL or even class templates. Class templates uses the same concepts that are in the C++ STL but are user defined. An example is:
template <typename T> class MisterEd{ public: void func1(T const v1); void func1(T const v1, T const v2); private: T d1; T d2; };
Summary: Iwant to implement a printer program. I have a printer and tasks sent to it. Every task has an unique ID and priority>=1 between 1…k. 1 is the highest priority. Tasks with the same priority will be p...
Summary: hi , can any one solve follwing problem which is under Data Structure through 'C'- Que- Let T be a binary tree with height 'h' and 'n' nodes. Show that log(n+1)-1=h=(n-1)/2 for which values of n and ...
Summary: Hey everyone, need a quick primer here on which data structure you guys think I should use. Basically I am writing a program which can transfer weather data across a small network, and I need to comp...