i have to generate filenames
text file names as
c:\\blabla.. saved(counter).txt
the counter is an integer value
i cant do it
i cant generate filename like dat
i declared a string c:\\blabla
second counter
third .txt
now i have to concatenate all three in a string variable
and this has to be generated in a for loop....

can anybody tell me method to do it...asap.thank you

Recommended Answers

All 2 Replies

problem redefined:
Strcat() to concantenate an int to char array


How to concantenate a number to a char, for example, concatenate a number to a filename, a file that has been created. I'm aware of strcat(), but the tricky part was creating an array for the filename and then appending a number to it..

First is the number -10 < n < 10 ? Is it within -10 and 10 but not including 10?

Or can it be any number?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.