// Justin C. Miller
// University of Wisconsin Oshkosh
// made for: http://www.geocities.com/neonprimetime.geo/index.html
// done in: Borland Builder 4.0
// Date: 3-2-2001
// Title: using itoa(int, char*, int)
#include
#include
#include
// itoa - converts integers to strings
void Function(int nbr);
int main()
{
int i = 1 ;
Function(i) ;
return 0 ;
}
void Function(int nbr)
{
char FileName[5] = "file" ;
char number[5] ;
// itoa converts integers to strings
// itoa takes 3 parameters
// 1st is the integer to convert
// 2nd is the string to store it it
// 3rd is the base (most times it's 10 which is decimal)
itoa(nbr, number, 10) ;
char Extension[5] = ".txt" ;
strcat(FileName, number) ;
strcat(FileName,Extension) ;
cout << FileName << endl ;
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)