problem with cc

Asked by Avinash

hey i did sudo apt-get install build-essential...
but noe when i compile..i got this..

avinash@avinash-laptop:~$ cc prog10b.c
avinash@avinash-laptop:~$ ./a.out
Segmentation fault (core dumped)

PLS HELP

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gord Allott (gordallott) said :
#1

a segmentation fault happens when there is a bug in *your* code, its not something we can fix for you. usually it happens because you have tried to modify some memory that hasn't been allocated yet, such as:

int *thing;
*thing = 2;

you can get the programs 'gdb' (command line debugger) and 'ddd' (gui debugger) to help you track down your error

Can you help with this problem?

Provide an answer of your own, or ask Avinash for more information if necessary.

To post a message you must log in.