I have a class with a data member of 128 KB (a character string)
class cmyclass
{
protected:
char buff[131072];
public:
//constructor
cmyclass(const char* pChar)
{
memset(buff,0,131072*sizeof(char));
strcpy(buff,pChar);
}
//destructor
}
the program crashes at runtime (I do not use malloc or new) in the RELEASE version; do you know why??
Isn't it possible to have members with bigger size than 64 KB ???
void main(void)
{
.....
cmyclass obj("John"
;
....
}
class cmyclass
{
protected:
char buff[131072];
public:
//constructor
cmyclass(const char* pChar)
{
memset(buff,0,131072*sizeof(char));
strcpy(buff,pChar);
}
//destructor
}
the program crashes at runtime (I do not use malloc or new) in the RELEASE version; do you know why??
Isn't it possible to have members with bigger size than 64 KB ???
void main(void)
{
.....
cmyclass obj("John"
....
}