gentiradentes

Any way to create an array of streams?

Discussion created by gentiradentes on Jun 20, 2009
Latest reply on Jun 20, 2009 by gaurav.garg

I'm trying to create a dynamically allocated array of streams, but there is no default constructor for Brook's stream object, so the typical syntax for a simple pointer array doesn't work.

 

> Stream<int>* streams = new Stream<int>[numStreams]; //Needs a ctor

 

I also tried a vector, but that didn't work either. Is there any way to create an array of streams? If not, is there any other way to dynamically allocate an arbitrary number of streams?

 

Thanks.

Outcomes