From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: conversion question Date: Sat, 26 Dec 1998 02:13:28 -0500 Content-Transfer-Encoding: 8bit References: <01be301f$9a15ec40$LocalHost AT default> X-Posted-Path-Was: not-for-mail X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-ELN-Date: 26 Dec 1998 07:13:55 GMT X-ELN-Insert-Date: Fri Dec 25 23:15:05 1998 Organization: Nocturnal Aviation Lines: 26 Mime-Version: 1.0 NNTP-Posting-Host: 1cust5.tnt12.nyc3.da.uu.net Message-ID: <36848C98.A49F69DD@earthlink.net> X-Mailer: Mozilla 4.5 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Börje Granberg wrote: > > Hello! > My name is Börje and I live in Schweden. > I have problem with my ex of DJGPP: > I've been working with DJGPP at home for about 4-5 month and now I > have > come to the problem that I dont know how to convert a INT to at CHAR*. > I want the INT I to become a string so I can add a number, let's say > '123' to > the string "Look on page " so it will be "Look on page 123". > > Thank you for helping me #include int main(void) { char foobar[BUFSIZ]; int pagenum = 123; sprintf(foobar,"Look on page %d", pagenum); return 0; } -- Martin Ambuhl (mambuhl AT earthlink DOT net) Note: mambuhl AT tiac DOT net will soon be inactive