Hello, here's the code
I get the following error's when executing. 12 is my input.Code:#include <iostream.h> int main() { int x; int *ptr = new int; ptr=&x; cin>>x; cout<<*ptr; delete ptr; return 0; }
I know the error arn't code, i just wanted to keep it seperate.Code:12 12Exiting due to signal SIGSEGV Page fault at eip=000057c4, error=0006 eax=000be93c ebx=000be938 ecx=000be800 edx=000be93c esi=00000054 edi=0003e960 ebp=000be8e8 esp=000be8dc program=C:\DJGPP\WTF\POINTER.EXE cs: sel=00a7 base=8563a000 limit=ffb13fff ds: sel=00b7 base=8563a000 limit=ffb13fff es: sel=00b7 base=8563a000 limit=ffb13fff fs: sel=0087 base=0000c220 limit=0000ffff gs: sel=00c7 base=00000000 limit=0010ffff ss: sel=00b7 base=8563a000 limit=ffb13fff App stack: [000be960..0003e960] Exceptn stack: [0003e8bc..0003c97c] Call frame traceback EIPs: 0x000057c4 0x0000f941 0x00001633 0x00005188
My compiler is djgpp.
Any help would be much appreaciated.