By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,908 Members | 1,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,908 IT Pros & Developers. It's quick & easy.

Map of Parent Type and calling child type copy constructor

P: n/a
Hi. I'm try to construct a map<int, Shapeso that I can keep a list of
Shapes. Here's a simplified version of my code so far:

Shape
{

};

--
Posted via a free Usenet account from http://www.teranews.com

Jul 12 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Brandt Dusthimer wrote:
Hi. I'm try to construct a map<int, Shapeso that I can keep a list of
Shapes. Here's a simplified version of my code so far:

Shape
{

};
Nothing wrong with it so far. Keep up the good work!

Cheers! --M

Jul 12 '06 #2

P: n/a

Brandt Dusthimer wrote:
Hi. I'm try to construct a map<int, Shapeso that I can keep a list of
Shapes. Here's a simplified version of my code so far:

Shape
{

};
They say true simplicity is genius!

Jul 12 '06 #3

P: n/a
mlimber wrote:
Brandt Dusthimer wrote:
Hi. I'm try to construct a map<int, Shapeso that I can keep a list of
Shapes. Here's a simplified version of my code so far:

Shape
{

};

Nothing wrong with it so far. Keep up the good work!

Really? Shouldn't it at least be "class Shape {};" ? Or "struct Shape
{};" ?

Best regards,

Tom

Jul 12 '06 #4

P: n/a
"Brandt Dusthimer" <du******@u.netwrote in message
news:pa****************************@u.net...
Hi. I'm try to construct a map<int, Shapeso that I can keep a list of
Shapes. Here's a simplified version of my code so far:

Shape
{

};
Well, I would say that was pretty simple. It won't even compile. Try this.

#include <map>

class Shape
{
};

int main()
{
std::map< int, Shape ShapeMap;
}
Jul 12 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.