Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by ">User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a ">Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
Page 1 2
#17372 - 01/04/04 06:51 AM Re: First Program (What u think)  
Joined: Dec 2003
Posts: 38
acid45 Offline
Junior Member
acid45  Offline
Junior Member

Joined: Dec 2003
Posts: 38

oh, i just read your other program. Thats not how you stop it so you can see it, you are just wasting memory (not like its a lot but hey, its better you dont get used to it now that you are startin to learn).
#include "conio.h"
getch(); //that will pause till you press a key
wouldn't including stdlib.h and using system("pause"); be a little less coding. You could even define it as something like:
#define PAUSE system("pause")
and then go to use it like this:
and it would come out like this:
"Press any key..."
or similar message

Sponsored Links
#17373 - 01/14/04 06:18 PM Re: First Program (What u think)  
Joined: Aug 2003
Posts: 240
paradox Offline
paradox  Offline

Joined: Aug 2003
Posts: 240
New Zealand
very unoptomized code would be slow as hell.. but you will learn you taken the 1st step thats what counts so stop criticizing him :p

The wise make mistakes, the fools repeat them
When you have eliminated the impossible, that which remains, however improbable, must be the truth
#17374 - 01/15/04 03:50 AM Re: First Program (What u think)  
Joined: Aug 2002
Posts: 68
Scalli0n Offline
Junior Member
Scalli0n  Offline
Junior Member

Joined: Aug 2002
Posts: 68
C++ is fun. I suggest you get this book:

Very good. very good stuff indeed.

That and read some online tutorials. Write some neat code, have some cool fun. Oh, pergesu has good stuff to (find his profile, he's got links in it) and uhm uhm uhm other than that check out when you want to do low-level graphics programming.

And learn java too.

#17375 - 01/15/04 06:55 AM Re: First Program (What u think)  
Joined: Dec 2003
Posts: 17
AnthonyVSD Offline
Junior Member
AnthonyVSD  Offline
Junior Member

Joined: Dec 2003
Posts: 17
BC, Canada
Coleman, if you don't know what you'll be able to do by being able to program C/C++, it's likely that there isn't much point in you learning it. If you'd just like to play around on the web, I suggest learning the basics first. Start with XHTML and PHP.

Anthony Gorecki
"Freedom through knowledge."
#17376 - 02/06/04 03:57 PM Re: First Program (What u think)  
Joined: Feb 2004
Posts: 5
simon Offline
Junior Member
simon  Offline
Junior Member

Joined: Feb 2004
Posts: 5
It's a example.Perhaps this example teaches the reader the application of the key word"if... else if...else". I think so.

Sponsored Links
#17377 - 02/07/04 01:05 PM Re: First Program (What u think)  
Joined: Oct 2003
Posts: 209
Red Mage Offline
Red Mage  Offline

Joined: Oct 2003
Posts: 209
Coleman: get to Dev C++ It's good smile

Ice: use something like this.. {variable = rand() % max;}
It'll give you a random number between 0 & "max"(which should also be replaced). I don't really know much about how it works, since I don't actually program in C++ :-D

Those who say do not know.
Those who know do not say.
#17378 - 02/07/04 05:26 PM Re: First Program (What u think)  
Joined: Jan 2004
Posts: 6
vooduhal Offline
Junior Member
vooduhal  Offline
Junior Member

Joined: Jan 2004
Posts: 6
variable = rand() % max;

rand() produces a random integer value.
% is called the modulus operator. It's basically what you learned to be the remainder in division. Ie. 5 % 3 = 2 and 16 % 5 = 1
As for this function, it actually only returns a number from 0 to max - 1, as you can't divide a number by a number and have the remainder equal to the divisor. Ie. a % b cannot equal b.

Page 1 2

Member Spotlight
Portland, OR; USA
Posts: 7,198
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Average Daily Posts3
Most Online1,567
Apr 25th, 2010
Latest Postings
shopping for jewelry with something above
by mikejoey on 04/12/17 08:01 AM
PANDORA North The usa
by mikejoey on 04/12/17 07:38 AM
Pandora’s birthstone products will always
by mikejoey on 04/12/17 07:14 AM
the newest Pandora necklaces crafting facility
by mikejoey on 04/12/17 06:53 AM
an Air Jordan 4 by Off White is in
by mikejoey on 04/12/17 06:35 AM
belonging to the adidas NMD XR1
by mikejoey on 04/12/17 05:50 AM
Other detailsThe adidas Originals Celebrity
by mikejoey on 04/12/17 05:35 AM
The DNA on the NMD model is actually
by mikejoey on 04/12/17 05:18 AM
in which adidas NMD XR1 “Zebra” supplying
by mikejoey on 04/12/17 04:05 AM
by Gremelin on 01/14/17 07:03 PM
Top Posters(All Time)
UGN Security 41,138
Gremelin 7,198
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 3
Black Beard Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
fleshwound Likes: 1
Ghost Likes: 2
Gremelin Likes: 12
Ice Likes: 1
ninjaneo Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20170206)