Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!tektronix!reed!cutler From: cutler@reed.UUCP (Steven J. Russell) Newsgroups: comp.sys.mac.programmer Subject: Problems with Think C and sprintf() on Mac Plus Message-ID: <16532@reed.UUCP> Date: 24 Jun 91 17:37:14 GMT Organization: Reed College, Portland OR Lines: 31 I'm having problems using sprintf to convert a float into a string on the Mac Plus. I am developing the program on a Mac II, but when I tested the program on the Mac + it died. I'm using Think C, and the code is like this result = sprintf(c, " %f", f); s = CtoPstr(c); SetIText(item, s); Basically, the text goes into a dialog box. All of the variables are declared properly, i.e. double f; char *s, *c; ... Does anybody have any hints? Is there a better way of doing this without using sprintf()? Also, I AM using the sprintf() in the "ANSI" library, not the "ANSI-881", and I don't have the 68881 code generation option checked. Steven Russell cutler@reed.edu -- Steven J. Russell "Shut up! Shut up! I don't wanna hear your mouth!" -- Anthrax UUCP: ...!tektronix!reed!cutler