• Advertisement
Sign in to follow this  

Where can I find info on these

This topic is 4930 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I know that these are C functions but I did not know I would need to use them until I started messing with SDL. for instance printf = prints to screen I know that sprintf sscanf scanf %s = seems to be a normal variable inserted it place of this %d = seems to be a address inserted in place of this

Share this post


Link to post
Share on other sites
Advertisement
Check out Cone3D's C lessons. There are some explanations there. But for your convience, I will explain a few for you.

printf as you know prints to the screen. It's sorta the equivilent to cout.

scanf gets input. It's similar to cin.

%d and %s are used in printf and scanf. %d stands for integer and %s is a string. There is also %f with of course is a float. I think %d is a double as well. Thats as much as I can remember.

Share this post


Link to post
Share on other sites
As a side note if youre just learning C

if youve got money and you find yourself frequently asking yourself "how did i use this again?" or "what was the arg order here?" and youre like me and would rather not go google it and wade through all the python and perl pages that come up now, id highly reccomend grabbing a a copy of the K&R book (The C Programming Language by Kernighan and Ritchie)

This book I probably the most used book that I own actually, the thing practically falls open to page 250 now (string functions) given how often i forget argument orders

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement