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.

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() ?

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

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.