PDA

View Full Version : how to make a program



kzpl14
17-07-2007, 05:16 AM
hey i was wondering if anybody could teach me how to make a program in dev-C++. I want to start with a simple one and i was thinking of something like a program that you put in numbers and than the one that appears the most will be displayed as 1 number = 25 then 2 number that appears the most and then on and on.

TGoddard
17-07-2007, 10:09 AM
The best place to start is with C++ tutorials on the net or a good book at a beginner level. For a first program you should try printing "Hello World!", then read how to get input and try to work out how to use an entered name instead of "World".

For counting the number of occurrences you really need a map from an integer to an integer. This is most easily done with the STL collections (map<int, int>). Leave this task until you're a bit more familiar with the C++ language.

kzpl14
17-07-2007, 11:15 AM
thanks, do u know any tutorials that are online?

Greg
17-07-2007, 11:32 AM
thanks, do u know any tutorials that are online?Probably not. But should you even be thinking about it if you can't do a Google search for "c++ tutorials".

kzpl14
17-07-2007, 11:46 AM
yea i did a google search and i did learn all the basic things about it but i still dont know all the things that u have to write in if u want to make a program i know how to write hello world and i did a program that you put in 3 numbers and it gives you the average but i found how to do that on youtube. And i dont know all the things that i put in and what they mean.

Graham L
17-07-2007, 04:19 PM
Go to your public library, and look for a book on programming. Read it. Then practice. :cool:

Programming is not easy. You have to learn to express yourself precisely. The computer does what it is told to do by your programme. Exactly. It can't guess what you want it to do.

The compiler which translates your source programme into code the computer can execute is very fussy. It requires correct syntax, and it requires correct spelling. This might be a problem. ;)

Trev
17-07-2007, 05:54 PM
It requires correct syntax, and it requires correct spelling. This might be a problem. ;)
Trevor :lol: :lol: :lol: