R
Ralf Goertz
Hi,
this might be intentional, but I don't see a reason, why.
Running the program
----------------------
#include <iostream>
using namespace std;
int main(){
char *x=NULL;
cout<<"before"<<endl;
cout<<x<<endl;
cout<<"after"<<endl;
}
-------------------------
I would expect to see
-------------
before
after
-------------
but instead I get only
------------
before
------------
The program exits normally. Is that behaviour correct or is it a bug?
Linux i386, gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
Thanks,
Ralf
this might be intentional, but I don't see a reason, why.
Running the program
----------------------
#include <iostream>
using namespace std;
int main(){
char *x=NULL;
cout<<"before"<<endl;
cout<<x<<endl;
cout<<"after"<<endl;
}
-------------------------
I would expect to see
-------------
before
after
-------------
but instead I get only
------------
before
------------
The program exits normally. Is that behaviour correct or is it a bug?
Linux i386, gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
Thanks,
Ralf