I hope I not asking a simple question, but I would like to know the following:
I am using AT&T's c++ translator. I am trying to declare a pointer to a class that has a parametrized constructor as a member. e.g
class foo
{
...
...
public:
foo(int s);
...
};
when I declare:
foo *fooptr;
I get a translator message saying an integer parameter is expected. I tried adding a parameterless contructor to the class definition but it still complains. Another thing I am trying to do is declare an array of objects that take parametrized constructors e.g:
fooarray = new foo(2)[10];
apparantly this is not possible in c++, but I need a conceptually decent workaround.
Does anyone have any solutions. Information would be much appreciated. Please reply to my email address. I will summarize and post.