Segmentation Fault in my program
- From: "Amar Prakash Tripaithi" <tripathi.satya@xxxxxxxxx>
- Date: 3 Dec 2005 05:59:10 -0800
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
.
- Follow-Ups:
- Re: Segmentation Fault in my program
- From: Lew Pitcher
- Re: Segmentation Fault in my program
- Prev by Date: Re: Where is the mistake?
- Next by Date: Re: int main() or int main(void)?
- Previous by thread: int main() or int main(void)?
- Next by thread: Re: Segmentation Fault in my program
- Index(es):
Relevant Pages
|