Original Post
How to make an array of classes using stl, whit the constructer and destructor called?
#include <vector>
#include <stdio.h>
using namespace std;
class Test
{
public:
Test()
{
printf("Hi\n");
}
~Test()
{
printf("cya\n");
}
int l;
int b;
};
void main()
{
vector v(2);
}
this way doesn''t work. The constructer is called once and the destructor 3 timer.
btw. I use msvc 6 and the stl files I got with it
My Site