Hi,

 

I have a std:vector of PmStream* but I can't figure out a way to create the
stream objects on-the-fly.  Here's my code:

 

Int streamcount = some_value;

int i; 

std::vector < PmStream*> v; 

 

for (i = 0; i < streamcount; i++) 

{ 

// VS2010 reports error C2469: 'new' : cannot allocate 'void' objects with
the following line

PmStream* s = new PmStream(); 

v.push_back(s); 

}

 

Can anybody see where I'm going wrong, please?  My research on the net would
seem to indicate that using "new" to create instances of a void (abstract)
class isn't allowed, but I can't find a work-around.

 

Best wishes.

 

Tim Burgess

Raised Bar Ltd

Phone:  +44 (0)1827 719822

 

Don't forget to vote for improved access to music and music technology at

 

http://www.raisedbar.net/petition.htm

 

_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to