turbo C initializing pointer problem

dbearly at vax1.tcd.ie dbearly at vax1.tcd.ie
Tue Jan 15 22:19:40 AEST 1991


I seem to be having a few problems with pointers in TC 2.0.
What happens is I have a pointer to a data structure 
( a doubly linked list) which contains character string 
pointers etc.
At compile time I get the warning 'possible use before initialization'
on the first element of the list and then have problems with the 
first call to strcpy to this element (ie it doesn't work).

I have tried initializing the element to NULL, which gets rid of the
warning and strcpy problems, but when the program terminates I get a
'Null pointer assignment' message.

	What can I do ??

			Dom.    8-{0

dbearly at vax1.tcd.ie
dbearly at unix1.tcd.ie



More information about the Comp.lang.c mailing list