0

I was just wandering if there was a way to put information in to a string but increment a section of the text when putting it in the string.

To put it simply:

string="to be put in string[this is to be incremented]";

I was wandering if there is a way to do this.

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Lillylionhert
0

What do you mean "incremented"?
Are you wanting to set up a counter and then increment the counter in a loop and append or insert it into a string inside some brackets?

have you looked up sprintf() ?

Edited by thines01: n/a

0

Thank you for the reply but i have just figured out what was wrong with my program.
The increment bit was to replace the bit that i thought wasn't working.
All i had to move was move the printf section up a few lines to be above my memset.
Again thanks for the reply.
:3

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.