B
bimal.eranda
Hi!
I have some problems in the following code.
#include <windows.h>
#include<iostream.h>
void main(){
LPSTR x="";
long y=125;
_ltoa(y, x, 10);
cout<<x<<endl;
}
Some times it work without any errors but some times it throws an
exception saying Access violation. it happens only in the release mode
compilation. when u assign the "" string to the x variable some times
the x get assigned to memory address 0x000000. then it'll throw that
exception.
Does any one know the reason to why this happens?
I have some problems in the following code.
#include <windows.h>
#include<iostream.h>
void main(){
LPSTR x="";
long y=125;
_ltoa(y, x, 10);
cout<<x<<endl;
}
Some times it work without any errors but some times it throws an
exception saying Access violation. it happens only in the release mode
compilation. when u assign the "" string to the x variable some times
the x get assigned to memory address 0x000000. then it'll throw that
exception.
Does any one know the reason to why this happens?