UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Sponsored Links
Latest Postings
by Gremelin
Yesterday at 06:01 PM
Latest Reviews
Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#17372 - 01/03/04 10:51 PM Re: First Program (What u think)
acid45 Offline
Junior Member

Registered: 12/19/03
Posts: 38
Loc: canada

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 10:18 AM Re: First Program (What u think)
paradox Offline

Registered: 08/28/03
Posts: 240
Loc: 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/14/04 07:50 PM Re: First Program (What u think)
Scalli0n Offline
Junior Member

Registered: 08/01/02
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/14/04 10:55 PM Re: First Program (What u think)
AnthonyVSD Offline
Junior Member

Registered: 12/21/03
Posts: 17
Loc: 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 07:57 AM Re: First Program (What u think)
simon Offline
Junior Member

Registered: 02/06/04
Posts: 5
Loc: shanghai
It's a example.Perhaps this example teaches the reader the application of the key word"if... else if...else". I think so.

#17377 - 02/07/04 05:05 AM Re: First Program (What u think)
Red Mage Offline

Registered: 10/24/03
Posts: 209
Loc: here.
Coleman: get to Dev C++ It's good

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 09:26 AM Re: First Program (What u think)
vooduhal Offline
Junior Member

Registered: 01/02/04
Posts: 6
Loc: TN, USA
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 2 of 2 < 1 2

Featured Member
Registered: 03/02/02
Posts: 137
Forum Stats
2158 Members
46 Forums
41514 Topics
76689 Posts

Max Online: 1567 @ 04/25/10 02:20 AM
Top Posters
UGN Security 34676
Gremelin 7194
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Jan Havelles, Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit
2158 Registered Users
Who's Online
1 registered (Gremelin), 231 Guests and 318 Spiders online.
Key: Admin, Global Mod, Mod
Latest News

  Get Firefox!
Get FireFox!