| delorie.com/archives/browse.cgi | search |
| From: | Chong Kai Xiong <w_velocity AT yahoo DOT com> |
| 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: | <kk9X2.3253$%W6 DOT 12159 AT wagner DOT videotron DOT net> |
| NNTP-Posting-Host: | as002808.singnet.com.sg |
| Mime-Version: | 1.0 |
| 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.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |