Run under VC6.0 error pop up box that memory cross-border problems, under Linux directly is not compiled through, program is to recycle crossing the line of memory, to overcome
CodePudding user response:
The code posted and have a lookCodePudding user response:
Code to hundreds of line,,,, how can I let you see?CodePudding user response:
http://user.qzone.qq.com/359324687/infocenter#! App=2 & amp; Via=QZ. HashRefresh& Pos=1368151689Gc. H point connect can see, below is the show. The CPP
Show the CPP
#include
#include
# include "gc. H"
using namespace std;
Int main () {
GCPtr
GCPtr
Try {
P=new int (10);
Q=new int (11);
cout <"Value at p is:" & lt; <* p & lt;
//Now, create a local object.
{//start a block
GCPtr
cout <"Value at r is:" & lt; <* r & lt;
cout <"After exiting block. \ n";
{} the catch (bad_alloc exc)
cout <"Allocation failure! \n";
return 1;
}
}
CodePudding user response:
What is the original book in programming environment to run?CodePudding user response:
Didn't write,,,CodePudding user response:
I was also looking at the book, it's really something wrong with the code of the book, I changed, as if can run,CodePudding user response:
Should be a garbage collect () the function to write has a problem, yourself to gclist. The debugged, remove (* p) there seems to be a problem on this,