Saxon's 48 hour programing Challenge.


Distinguished Member
Saxon's 48 hour programing Challenge.

Ok ladies an gentlemen, this is my 48 hour programing Challenge, in the next 48 hours commencing at 6pm GMT only taking time off to sleep an work I will teach myself how to program in C with the end result being a short program (undecided yet as to what it will be) this will allow me to learn something I have been wanting to do for along time an will help boost my skill set.

Wish me luck an pray i don't go mad. :??

It has begun.


OK first hurdle I have wrote the following:
/* this is a test */
#include <stdlib.h>
#include <stdio.h>

void main()
printf ("this my first program.\n");

An in line 6 my compiler (Dev-C++ is telling me `main' must return `int' I have gone through the code an I can't see anything wrong, it might just be a rookie mistake but can some one help me with it?
Last edited:
That code let me compile it but closed the window to quick to let me see what is on the screen, oh an thanks for the help CG.
Add this to the end of the program:
int a = 0;
cin >> a;

That'll make it wait before closing.


Oh, and I should mention, going mad is 90% of being a real coder.
Last edited:
I will give that a try then, I am looking forward to learning programing properly.


OK it works now! but i am still a little ignorant on why your tweaks worked an mine did not can you give me a rundown on what yours did that mine didn't? an why? that is if you have the time guru.
Last edited:
Windows searches for a function that returns an int and is called main. If it's not there some compilers won't accept it as valid code because it may not run.

Anyway, how did your 48 hours go?
Still going on I am counting hours I worked on the challenge not total time - I have to work an sleep some time.
Ah ! A clever change in the ground rules Saxon. This 48 hours could still be going next month then ?
ROFL !! I was waiting for a thread like this... don't go too mad now!!

I'm going mad learning to program myself. What are you using to program/compile the code? I'm starting with VB. C looks to cryptic for a beginner's language.
I know... I've tried a lot of free compilers/developer tools myself. A lot of the time there was so much involved with actually setting up the tools needed to build projects from the source code.

If you haven't heard of it already, Microsoft offers free (Express) versions of the Visaul Studio IDE that have all the basics the paid versions have that you can download. All you need to do to use them is register with a new or existing Passport. That is, if you want to go down the Microsoft developer route :smile:. MSDN (Microsoft Developer Network) also has a beginner developer learning center with short articles and videos to get you started.

I am using VS 2008 Pro myself, but I've tried the 2005 Express Editions before and they are pretty good considering how they are free. You can get language specific editions or the entire suite :smile:.
Last edited:
Actually, you can even get the 2008 Express Editions as well now, they're pretty good.

For C++, I don't recommend anything other than VC++ (Express or otherwise) and NetBeans 6.1 (if you're looking for free and non-Windows).