View Full Version : What first program? Please read it

11-17-2001, 10:36 AM
I've seen lots of threads about what book you should buy to learn C, and many questions from newbies (like me, under Gades) because they're working on their first project. And sometimes "this" project probably is not the most appropiate.

So, my question is about what type of program should we start with? I'm not talking about the "hello world" type, I'm talking more of something like making a personal phone book, a calculator, etc.

So please, I think this thread would be very interesting for everyone starting, could you give your opinion?

As a second part of the question, I'd like you guys to say which one was (more or less) your first program as a newbie; saying what was more difficult of it, and if you'd recommend it.

Thans for replying to this thread (because I guess you will ;) )

11-17-2001, 10:48 AM
it depends on what you know....if you know alot then go on to a Tic Tac Cut off my toe game with AI, but if you're sort of a newbie, then do a calculator.

and mine was a calculator

11-17-2001, 05:40 PM
Thanks for your reply Xterria.

I've seen a couple of times on the games board that people suggest to do this game (Tic Tac Cut...), but I don't even know the game!!

So you think a calculator is a good program for a newbie.

Would you post it? It's not for me (right now I have more than enogh with my program :) ), but for anyone who is starting.

It's a shame not more people answer this thread, I think it'd be very helpful. If I'm wrong, please let me know. I can't help too many people answering questions at the C board, so I thought this was a good idea.

11-17-2001, 07:08 PM
I'll tell you what my first (useful) program was. Summed up, it read a file (file I/O) and put questions from the setup file into a linked list (advanced pointers) and then randomly asked questions and received user input (I/O) and then decided if the question was right.


11-17-2001, 07:35 PM
I did that calculator before some program formatted my harddrive. Never made one since (that just occurred to me) but after that, I made a tic-tac-toe game(Visual C++)

11-18-2001, 04:42 PM
My first FULL program was a recursive solution to the Hanoi's towers problem, I made it in VB, would you like to see it? (program is in spanish though)


11-18-2001, 04:46 PM
As soon as I pass this subject (C Programming), I want to learn Visual Basic, so please post it.

But what is Hanoi's towers problem?

11-18-2001, 05:09 PM
>.....(view the program),.......

Where is it? Did you try to attach it?

11-18-2001, 05:10 PM
Hanoi's towers is an ancient problem which consists of three towers and some rings of progressive sizes, the game begins with all the rings in the far left tower organized the bigger one below, and the idea is to move them all to the far right tower with these two rules:

1. you can only move one ring at a time
2. there can never be a bigger ring on tom of a smaller one

check it out

P.S. I couldn't attach the program properly the previous time, so use this one


11-18-2001, 05:11 PM
Xterria: I tried to compile your code and it doesn't, can you post the executable program?


11-19-2001, 06:32 AM
Garfield: would you post your exe file? Just to have a better idea of what you did.

I can't believe people don't reply more to this thread. Lot's of you guys reply to questions; some easy ones, some difficult ones. How come you don't answer this one? Can you tell me if there's something wrong about this idea?

11-19-2001, 07:02 AM
>>> people don't reply more to this thread

You can't make people reply if they are not interested in replying. One reason they may not be interested is that they've already seen this type of thread many times before, just a few days ago, for example, there was a "What should be my next program" thread on the C++ board...

By the way, my first program read a deck of punched cards, averaged some values and then produced a batch job which passed the data to a statistical analysis package.

11-19-2001, 07:35 AM
My first program ? My first program printed a joke to the screen.
Incredibly boring but took me about a day in Basic... :(

The first real program was a character creator for AD&D. Took a while too, because I had to code the GUI myself. I.e. Button = Colored rectangle with a special function called when clicked inside. No OOP, no classes, no predefined stuff.

Whatever you do as a first, make it short, make it easy and make something motivating. What that is depends on your own taste and speed of learning.

Re: Replies: Keep in mind this is a messageboard. I checked this morning and didn't see your thread, I checked now, and there it is. In the US, people are getting up while I write this.

11-19-2001, 07:45 AM
I'm sorry if I've been rude and thanks for your replies.

>"What should be my next program" thread on the C++ board...

Sorry, I only read the C board and the GD, that's why I didn't see it. I've seen the other board maybe a couple of times, but I don't follow them at all.

11-19-2001, 08:25 AM
>>> I'm sorry if I've been rude and thanks for your replies

You've not been rude, I was simply suggesting a reason why people may not have replied. It is, of course, also true what NV said, many members have not logged on yet today...

11-19-2001, 10:04 AM
He he... my first real proggie opened up a file on a sage accounting system and decoded the file to get passwords and logon names. I already worked out how to decode the file, but I used C to do it for me..... Took about a week to do and it was on reflection the worst bit of coding imaginable........ I didnt know how to search directories for this file and so resorted to using System() with dos commands and then output them into another text file to read.....

Sloppy... but it did work.....

11-19-2001, 10:14 AM
>opened up a file on a sage accounting system and decoded the >file to get passwords and logon names

So if that's how you started, what do you do know????

Should we be aware? :D ;)

11-19-2001, 12:56 PM
Hmm, I believe my first program that was not a school project was a text based RPG battle engine. I think it was pretty fun, you gained levels, developed new attacks, and there were a bunch of enemies chosen at random that gained levels with you so it was always a challenge.

I may rewrite it someday. Seeing as how I tossed the code when I got my new computer :P

11-19-2001, 01:08 PM
my first program was a nice presentation about perception for my father, it was programmed in VB, I really was surprised with my work, it used some 3d routines and had some paint programs embedded, some anims and music; that was what I call my first serious program, the, when I learned C, my first program was (Oskilian, tell me if I am wrong) a word mixer, very confusing, the next step was a program just like the one described by Garfield, but I used a 3d array instead of the pointers, cool prog.

remembering old times

11-19-2001, 01:26 PM
Camilo: how am I supposed to know the first C program you made.

Hey, y'all, how'd you like my program?


11-19-2001, 05:47 PM
I've run your program.

I like it, it's quited good.

I'll definetly post mine when is finished, just in a few days

11-21-2001, 10:58 AM
because you assisted to my C classes and you received the same problems, so, my first C program was the first problem in the guide of problems, remember?.

'worrying about my university'