forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

++ an int in a string

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Thu Jun 12, 2008 1:01 am    Post subject: ++ an int in a string Reply with quote

Hi,

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

I got this :
Code:
    sprintf(O, "%s", config.C10);


i want to do somethig like

Code:
       config.C10++;

so that 10 becomes 11, 11 becomes 12, etc

Tnx in advance
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Thu Jun 12, 2008 1:06 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group