Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
My first program I ever wanted to make!

 
Post new topic   Reply to topic Printable version
 View previous topic  First c program Post :: Post A3SSO : A3 SubSpace Organizer  View next topic  
Author Message
Burglary
Newbie


Age:31
Gender:Gender:Male
Joined: Mar 02 2008
Posts: 2
Offline

PostPosted: Sun Mar 02, 2008 6:55 pm    Post subject: My first program I ever wanted to make! Reply to topic Reply with quote

Hi, this is a register - login - contest signup form program I created using the basic knowledge I've learned so far. I always wanted to make something like this for a menu of a game. I'm working on it at school but I haven't learned graphics yet (I'll update this when I learn more about graphics, if anyone's interested)!

Well anyways, I made this with C language and used Miracle C Compiler (It's pretty easy to use and less tools than other compilers, I think). If you know any good compilers please post them here (hehe)!

Please give me some ideas/bugs/tips/suggestions or whatever about this program and how it can be improved! Thanks, the program is attached to this post, I also put the source within the zip.

Have fun! Hope you like it!

*Added a calculator program below!
-I will work on the sin/cos/tan functions after & formulas to do your homework tongue.gif




My second program - basic calculator

calculator.zip - 9.34 KB
File downloaded or viewed 30 time(s)

My first program - possibly final edit

form.zip - 9.77 KB
File downloaded or viewed 42 time(s)


Last edited by Burglary on Mon Mar 03, 2008 5:28 pm, edited 4 times in total
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sun Mar 02, 2008 7:29 pm    Post subject: Reply to topic Reply with quote

I see you mixed gets/scanf. Generally scanf is better (although technically it can/will increase executable filesize). With scanf you should use the format string to restrict the number of characters read, this will prevent it writing off the end of your strings. For example:
Code: Show/Hide
char name[32];
scanf("%31s", name);

You don't need to include the .map, .obj and .src files in the zip, just the .c file.

Miracle C Compiler? Interesting only 400k download, I wonder if it pulls other stuff from the web during installation. I use Dev-C++ myself (it does C programs too), which does have the annoying "feature" of mixing spaces with tabs when indenting.
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Burglary
Newbie


Age:31
Gender:Gender:Male
Joined: Mar 02 2008
Posts: 2
Offline

PostPosted: Sun Mar 02, 2008 7:35 pm    Post subject: Reply to topic Reply with quote

ahh I see! The field length! Hm.. could be useful, I'll put it in! Thanks Smong!

But when I run it, it won't stop when it hits 20 chars when I do scanf("%20s", regname);. And if the character exceeds 20 chars, it would say something that you wouldn't see when you type something within 20 chars?
Back to top
View users profile Send private message Add User to Ignore List
AJ
Novice


Age:113
Gender:Gender:Male
Joined: Jun 19 2007
Posts: 33
Offline

PostPosted: Sun Mar 02, 2008 8:25 pm    Post subject: Reply to topic Reply with quote

ahhh nice work burg, you showed me how to accept text from the user Thanks!
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 592 page(s) served in previous 5 minutes.

phpBB Created this page in 0.581873 seconds : 31 queries executed (84.1%): GZIP compression disabled