Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!mit-eddie!killer!vector!gryphon!pnet02!rickf From: rickf@pnet02.cts.com (Rick Flower) Newsgroups: comp.lang.c Subject: Can ANYONE tell me why this code snippet doesn't work?? Message-ID: <7778@gryphon.CTS.COM> Date: 15 Oct 88 05:00:17 GMT Sender: root@gryphon.CTS.COM Organization: People-Net [pnet02], Redondo Beach, CA. Lines: 35 I've been trying to get the following code to work.. I've tried just about everything that I could think of (along the lines of modifications). All I'm trying to do is write a different printf routine to route information through a window text printing routine... If anyone can help me, let me know.. ----------------------------------------------------------------------------- void Test(fmt,args) char *fmt; unsigned *args; { char buff[129]; sprintf(buff,fmt,args); printf("%s\n",buff); } main() { Test("%d %d %d %d",10,20,30,40); } ------------------------------------------------------------------------------ I would think that it would just insert the 10 and 20 and 30 and 40 in the appropriate places in the fmt line.. but it only does the 1st two numbers.. the other two are garbage values.. Thanks in advance.. =============================================================================== I Thought So... UUCP: {ames!elroy, }!gryphon!pnet02!rickf INET: rickf@pnet02.cts.com ===============================================================================