From: Chong Kai Xiong Newsgroups: comp.os.msdos.djgpp Subject: Re: Why printf of stdio.h don't work ? Date: Mon, 03 May 1999 19:42:46 +0800 Organization: Singapore Telecommunications Ltd Lines: 17 Message-ID: <372D8BB6.8713DEAD@yahoo.com> References: NNTP-Posting-Host: as002808.singnet.com.sg Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com OmniMeta wrote: > I can't print anything with printf, why ? > > here, sttr is a char* and col a int > what's wrong ? > > gotoxy(40-strlen(sttr)/2,col); > printf("%s",sttr); I really think there's nothing wrong with your code. Your use of the variable "col" struck me though. note that the parameter for gotoxy is the x-coordinate(column) then y(row). Check the value of "col", it may be out of the screen boundaries.