K
Kevin Stern
Hi All,
If I type in more than 1 character in the cin portion, the delete
causes the following:
Debug Error!
Program: test.exe
DAMAGE: after Normal block (#54) at 0x002F0930.
Take a look at the following:
#include <iostream.h>
struct blah {
char a[2];
};
void main() {
blah* b;
b = new blah();
delete b;
b = new blah();
cin >> b -> a;
b -> a[1] = '\0';
delete b;
}
Any ideas?
If I type in more than 1 character in the cin portion, the delete
causes the following:
Debug Error!
Program: test.exe
DAMAGE: after Normal block (#54) at 0x002F0930.
Take a look at the following:
#include <iostream.h>
struct blah {
char a[2];
};
void main() {
blah* b;
b = new blah();
delete b;
b = new blah();
cin >> b -> a;
b -> a[1] = '\0';
delete b;
}
Any ideas?