Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!iuvax!ux1.cso.uiuc.edu!dino!news.iastate.edu!du248-16.cc.iastate.edu!niko From: niko@du248-16.cc.iastate.edu (Schuessler Nikolaus E) Newsgroups: comp.sys.mac.programmer Subject: Re: Basic Help w/ ThinkC Message-ID: <1990Oct8.130738.16312@news.iastate.edu> Date: 8 Oct 90 13:07:38 GMT References: <30725@netnews.upenn.edu> Sender: usenet@news.iastate.edu (USENET News Poster) Reply-To: niko@iastate.edu (Schuessler Nikolaus E) Distribution: usa Organization: Iowa State University Lines: 23 In article <30725@netnews.upenn.edu> eck@eniac.seas.upenn.edu (Brian Eck) writes: > > I'm trying to write a series of string values to the screen in Think C. I >have an array called grid[x][y], and I want to (basically) draw the values >of the array on the screen...I tried DrawString(grid[x][y]), but got garbage. >Thanks in advance... > > >Brian >eck@eniac.seas.upenn.edu My first guess would be that you haven't converted the C string to a pascal string. Use CtoPstr(). You can use sprintf() (which formats data and puts into a string variable you supply) and call CtoPstr(). CtoPstr changes the C string (terminated in 0x00) to a pascal string (bytecount first then the string). Remember, all routines have PASCAL calling conventions. -- ------------------------------------------------------------------------------ Niko Schuessler "On a two semester mission to engineer where niko@iastate.edu no-one has engineered before.... :-) " ------------------------------------------------------------------------------