A
Asger Joergensen
Hi
I'm not that used to the stl so I ask to be on the safe side:
typedef std::vector<char> TMembuf;
TMembuf buf(1000);
char* p = &buf[0];
I have tested it and it seem to work fine just like:
char* p = new char[1000];
and without the delete[];
But is there any downside to doing like this ?
Thanks in advance
Best regards
Asger-P
I'm not that used to the stl so I ask to be on the safe side:
typedef std::vector<char> TMembuf;
TMembuf buf(1000);
char* p = &buf[0];
I have tested it and it seem to work fine just like:
char* p = new char[1000];
and without the delete[];
But is there any downside to doing like this ?
Thanks in advance
Best regards
Asger-P