Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian GCC (http://www.linux-archive.org/debian-gcc/)
-   -   debian sid and ubuntu (http://www.linux-archive.org/debian-gcc/599481-debian-sid-ubuntu.html)

Mohsen Pahlevanzadeh 11-17-2011 03:51 AM

debian sid and ubuntu
 
Dear all,

I have debian sid and gcc 4.6.2-4 and libstdc++ 4.6.2-4, and i compile
following program:
/////////////////
#include <iostream>
using namespace std;
struct x{
int x;
int y;
};
int main(){
struct x *p;
cin >> p->x ;
int e;
cin >> e;
return 0;
}
/////////////////////////////////
When i run it under debian sid, i get segmentation fault for cin >>
p->x, but when i compile it under ubuntu, i run it without error.
What's problem under debian? (i like debian....)

--mohsen


All times are GMT. The time now is 05:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.