Forum Home
PC World Chat
 
Thread ID: 81103 2007-07-16 17:16:00 how to make a program kzpl14 (12542) PC World Chat
Post ID Timestamp Content User
569490 2007-07-16 17:16:00 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. kzpl14 (12542)
569491 2007-07-16 22:09:00 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.
TGoddard (7263)
569492 2007-07-16 23:15:00 thanks, do u know any tutorials that are online? kzpl14 (12542)
569493 2007-07-16 23:32:00 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". Greg (193)
569494 2007-07-16 23:46:00 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. kzpl14 (12542)
569495 2007-07-17 04:19:00 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. ;)
Graham L (2)
569496 2007-07-17 05:54:00 It requires correct syntax, and it requires correct spelling. This might be a problem. ;)
Trevor :lol: :lol: :lol:
Trev (427)
1