delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/25/16:11:56

Date: Fri, 25 Dec 1998 23:11:44 +0200 (EET)
From: Toni Rasanen <torasane AT mail DOT student DOT oulu DOT fi>
X-Sender: torasane AT paju DOT oulu DOT fi
To: djgpp AT delorie DOT com
Subject: Re: conversion question
In-Reply-To: <01be301f$9a15ec40$LocalHost@default>
Message-ID: <Pine.SGI.3.95.981225230936.5066A-100000@paju.oulu.fi>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

> 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 

Use itoa -function. For example;

char txt[20];
itoa (intvalue, txt, 10);

(last "10" is radix...). And resulting string of course is added
normally to another string with strcat-function...

 ///           Toni Räsänen
///       torasane AT mail DOT student DOT oulu DOT fi
\\\  Physicians ask how. Filosofians ask why. Dragons don't care.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019