X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Jason Carney" Newsgroups: comp.os.msdos.djgpp Subject: problem sending data to file Date: Thu, 2 Oct 2003 02:26:16 +0000 (UTC) Organization: BT Openworld Lines: 21 Message-ID: NNTP-Posting-Host: host81-128-246-182.in-addr.btopenworld.com X-Trace: titan.btinternet.com 1065061576 20407 81.128.246.182 (2 Oct 2003 02:26:16 GMT) X-Complaints-To: news-complaints AT lists DOT btinternet DOT com NNTP-Posting-Date: Thu, 2 Oct 2003 02:26:16 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Does anyone have an explanation for this, its bugging me. I'm new to c and using djgpp, maybe there is a simple answer. In main: char *x, *p; conductor = ch; /*pointers to a char array*/ long int *len; *len = 0; p = nletterword(7,len,conductor, charcnt); printf(" "); x = alpha(p, *len); printlist("dump.txt", x, *len); free(x); x is a pointer to a character array, why is printf there? if i take it out i get junk at the end of the dump.txt file, when it is present printlist prints the data pointed to by x to the file without any trouble. Any ideas on what i am doing wrong or why this might happen? thanks for any help.