Can anyone help
My dissertation is in in afew days and my motif program is code dumping.
I have a file called file.c which is used to input and output files from the
application. Everything works fine. I just want to set the vale on my sacle
widget. AllI have to do to make my program code dump is to add the line:-
Arg al[10];
for the argument list.
without this line the program wont core dump, but as soon as i add it the
interface core dumps when i open a file.
why is this,
can anyone help PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Kieran
Take a deep breath, let it out slowly.
You must be defining al[] someplace else, apparently with a larger size.
If not, a decent compiler would scream when you remove that line.
When you define it as "al[10]" you're making it smaller than the number
of values you're sticking in it. Count all those n++'s and define it
to be somewhat larger.
If it turns out that the other "al" isn't being used as an argument list,
you might consider the advantages of more meaningful variable names.
If it is an argument list, consider the evils of global variables.
--
Lee Boyle;boy...@agcs.com;standard disclaimers apply;;
> I have a file called file.c which is used to input and output files from the
> application. Everything works fine. I just want to set the vale on my sacle
> widget. AllI have to do to make my program code dump is to add the line:-
>
> Arg al[10];
It's most unlikely that anyone can help given this level of information.
Post some real detail and someone may be able to help. It sounds like a
case of your programming writing some area of memory that it's not
supposed to, which just happens to matter when you have the extra variable
in and not when you don't.
Hope it's not too late,
Nicholas.
--
Nicholas Young. Opinions expressed above are mine, not Logica's.
I am often away; mail me if you wish to be sure I see articles.
If you have problems mailing to the return address, try also
you...@logica.com and/or nich...@jessica.logica.co.uk.