Segmentation Fault in my program



Hi Friends,
I am working on a project of User Interface Class Library. In
it, I have to create a class library in "gnu" using c++ and curses
library. I am facing problem while I am on the way of organizing the
file.
Actually I had to create the header files. Now, when I
initialized the "WINDOW *win" in the Super class Window and destroy it
there using "endwin()" command, I am facing segmentation fault.
Beside this I had organized the common attributes of various
User Interfae controls into structure, take for example:
struct Position{
int Height;
int width;
}

Position *p={23,34};

// the struct is declared as global. and its default value declaration
is also global.

In the Label class, when I try to pass this value to the local variable
that too give me a segmentation fault,...

//code extract

class label
{
private:
Position *LoP;
public:
int default()
{
LoP=&P;
}
}

Can anyone please help me in getting out of this problem.


with regards

Amar Prakash Tripathi

.



Relevant Pages