start a code? do you always start with include <iostream> ? and what should i always keep in mind when working with codes?
start a code? do you always start with include <iostream> ? and what should i always keep in mind when working with codes?
You generally start it with a tutorial.
Cheers
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
Apparently we have a new forum bug. They have zero posts, and yet, there is one...
Quzah.
Hope is the first step on the road to disappointment.
Push the big red button.
But actually, in every console program you need to have main().
Will be the format for your most very basic programs. You might want to read some tutorials to learn about variables, conditional testing, and all sorts of other goodies to get you off the ground.Code:int main(){ //Code.... return 0; }
That lovely iostream file isn't ALWAYS needed, but in most console programs in C++, it's pretty much a neccesity. It contains several input and output functions, like cin (C input) and cout (C output), which take in data from the user and print out data, respectively.
Last edited by Krak; 01-31-2005 at 10:35 PM.
Come on now... This is a CS board. </inane remark>Originally Posted by quzah
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
that's odd, I thought they were classes, which was always a C++ thing... why would they be called C input and output if they are a C++ thing?Originally Posted by Krak
squawktheelf: the correct answer is: start every program with a comment. The name of the program, a brief description, and your name. it's also a good idea to include the date.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
>>why would they be called C input and output if they are a C++ thing?
They're "console in" and "console out".
And I agree with Zach, a tutorial is usually a good place to start
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
That is correct for you for now sir.
and it's "sarcasm"Originally Posted by Hunter2
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
Code:int main(){ for (;;){ SpreadViruses(); Hack_Govt_Agencies(); } return 0; }
Why are we hacking Govtcheez's agencies?
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
He called me fat.Originally Posted by XSquared
But you are...
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
Some background for 'ya, squawktheelf,
Standard C++ includes 51 function libraries which are "pointed-to" by including the associated header file. For example, you can add, subtract multiply, and divide without any headers, but if you want to perform a square-root, you #include <cmath> which has the sqrt() function. And, <ctime> has functions (and other stuff) for working with dates & times, etc.
Most compilers will have additional non-standard headers.
You might be a programmer if... You always start counting at zero!They have zero posts, and yet, there is one...
and he resigned...Originally Posted by Krak
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT