niko@du248-16.cc.iastate.edu (Schuessler Nikolaus E) (10/08/90)
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.... :-) " ------------------------------------------------------------------------------