Misc User Apps - My first program I ever wanted to make! Burglary - Sun Mar 02, 2008 6:55 pm Post subject: My first program I ever wanted to make!
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 Smong - Sun Mar 02, 2008 7:29 pm Post subject:
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:
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.
Burglary - Sun Mar 02, 2008 7:35 pm Post subject:
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?
AJ - Sun Mar 02, 2008 8:25 pm Post subject:
ahhh nice work burg, you showed me how to accept text from the user Thanks!