468,467 Members | 2,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,467 developers. It's quick & easy.

Map of Parent Type and calling child type copy constructor

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
4 1202
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

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
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
"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.

Similar topics

3 posts views Thread by Maheshkumar.R | last post: by
10 posts views Thread by Goran Djuranovic | last post: by
6 posts views Thread by reandeau | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.