++ an int in a string

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Question_dev
Posts: 88
Joined: Fri Aug 24, 2007 8:23 pm

++ an int in a string

Post by Question_dev »

Hi,

I've searched a lot but i can't find it :

I got this :

Code: Select all

    sprintf(O, "%s", config.C10);
i want to do somethig like

Code: Select all

       config.C10++;
so that 10 becomes 11, 11 becomes 12, etc

Tnx in advance
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Why is the int stored in a string anyway?

If, for whatever reason you store the int as a string, can't you increase it before you store it?

I think your logic is out - maybe if you told us what you wanted to achieve we could better help you.

Also, this isn't PSP related in the slightest...
Post Reply