The Good News

Wouldn't that be a probable cause for lifting?
 
53 more minutes, I should go camp out

Its good to see that with all the boxes now that have those wierd bumpy 3d covers, valve went with a nice "flat" looking box
 
Originally posted by Letters
Indenting always gets messy for me... I prefer just leaving spaces between lines... yup, even with them large ones...
I don't mind indenting when programming. In fact, it's almost automatic in Visual Studio.NET Pro but here on the forums it's not worth (can't tab) it heh.
 
Originally posted by sportz103
Ares, I was going to get it, but they wouldnt sell it because its still the 29'th here. Heres a picture of the official box for those who havent seen it
Gotta love those vitamins...
 
hopefully some of those are caffeine pills, because ill be playing all day
 
Originally posted by Ares
I don't mind indenting when programming. In fact, it's almost automatic in Visual Studio.NET Pro but here on the forums it's not worth (can't tab) it heh.
Yeah, that gets annoying when programs indent for me... haha... I'm a freak...
 
??? was no one extremley impressed by my Bill Gates' Microsoft Excel if statement skillz???
 
Originally posted by sportz103
hopefully some of those are caffeine pills, because ill be playing all day
I have this Friday and Saturday off... I'm pretty sure if it comes out this week, I won't be sleeping until Sunday night... I dunno... I hear hallucinations can start after 36 hours of being awake...

Hell, that would just add to the experience! Awesome!

edit: WTF, I'm a hydra?! Jesus, I haven't posted THAT much have I?!
 
Originally posted by |CC|Hudson
??? was no one extremley impressed by my Bill Gates' Microsoft Excel if statement skillz???

I liked it, forgot to mention it. Now, try and do one in SQL for Access :p

BTW, how's this::::
// This program will display my mood depending on the
// actual release of HL2.
// It's for fun, duh!

#include <iostream>;
#include <string>;
using namespace std;

int main()
{
string Release;
string emotion;

cout << "Please input a possible release date from the following \n";
cout << "by typing it in exactly the same manner it's presented.\n";
cout << "Tomorrow, OneMonth, ThreeMonth, Into2004, Cancelled.\n";
cin << Release;
if (tomorrow(Release))
{
emotion = "Joyous";
}
else
}
if (OneMonth(Release))
emotion = "Disappointed";
else if (ThreeMonth(Release))
emotion = "Saddened and slightly angry";
else if (Into2004(Release))
emotion = "Seriously pissed off";
else if (Cancelled(Release))
emotion = "Psychotic, Murderous, and rampage imminent";
}
cout << "How I feel about HL2's release: " << emotion;
return 0;
}

-----
It won't let me post the indents so the format's gonna suck :p
 
With that sort of thing it is easier to give each choice a number so you would have -

Please input the following -

1 - Tomorrow

2 - One month

and so on.

Try it like this

#include <iostream>

void main()
{
int input = 0;

cout << "Please choose from the following release dates " << endl;
cout << "1 - Tomorrow" << endl;
cout << "2 - One month" << endl;
cout << "3 - Three months" << endl;
cout << "4 - 2004" << endl;
cout << "5 - Never" << endl;

cin >> input;

if (input == 1)
{
cout << endl << "WOO HOO";
}

else if (input == 2)
{
cout << endl << " BOO HOO";
}

else if (input == 3)
{
cout << endl << "Annoyed";
}

else if (input == 4)
{
cout << endl << " Killing spree";
}

else if (input == 5)
{
cout << endl << " Become evil dictator and destroy world";
}

else
{
cout << endl << "Learn to read and enter a proper number!!!";
}

return;

}

That is sort of right typed it in a hurry though
 
Originally posted by Ares
I liked it, forgot to mention it. Now, try and do one in SQL for Access :p

BTW, how's this::::
// This program will display my mood depending on the
// actual release of HL2.
// It's for fun, duh!

#include <iostream>;
#include <string>;
using namespace std;

int main()
{
string Release;
string emotion;

cout << "Please input a possible release date from the following \n";
cout << "by typing it in exactly the same manner it's presented.\n";

cout << "Tomorrow, OneMonth, ThreeMonth, Into2004, Cancelled.\n";
cin << Release;

if (Release == Tomorrow)
emotion = "Joyous";
else if (Release == OneMonth)
emotion = "Disappointed";
else if (Release == ThreeMonth)
emotion = "Saddened and slightly angry";
else if (Release == Into2004)
emotion = "Seriously pissed off";
else if (Release == Cancelled)
emotion = "Psychotic, Murderous, and rampage imminent";

cout << "How I feel about HL2's release: " << emotion;
return 0;
}
I think that's better...
 
Originally posted by Mitch2891
With that sort of thing it is easier to give each choice a number
I also like using numerical variables... easier thataway...
 
That's how I WAS going to do it but I was like "Nah, let's make it interesting with strings, etc." hehe.

What's with the 'main (void)' and 'Int Input = 0'?
I suppose the 'int input = 0' could be used to clean any garbage that may be there.
I've always seen the programs I write (newbie ones) with int main()
 
Originally posted by Ares
That's how I WAS going to do it but I was like "Nah, let's make it interesting with strings, etc." hehe.

What's with the 'main (void)' and 'Int Input = 0'?
I suppose the 'int input = 0' could be used to clean any garbage that may be there.
I've always seen the programs I write (newbie ones) with int main()

'Void' doesn't return a variable...
 
What about the if statements.. I thought I had to compare strings like this: ReleaseInput(Release) or OneMonth(Release) .. heh, this is fun :p
 
Ahhh Hell I dunno... haha... but that's generally the format used for calling a function...

nameoffunction(variableforfunction);
 
Let's make a magic eight-ball for HL2! ;p heh.
 
Main is void as void does not return a variable and main does not return anything so - void it is.

string compares can be done like this-

if(strcmp(release, 'Tomorrow') == 0)
{
cout << "Happy"
}

I think anyway it is a little while since I used strcmp and can't remember if it returns 1 or 0 for true - pretty sure it is 0 though
 
wouldn't true be 1, considering 1 is true in boolean?
 
actually if main doesn't return anything it's:

void main()

void main(void) <-- means it doesn't receive or return anything
 
So, I have to actually write 'strcmp' to tell the compiler to do so. What is 'strcmpi' then? It was mentiond earlier.
 
I wrote void main(). Not that it would matter as main does not recieve anything does it? Returns from other procedures don't count do they? Pretty sure they don't so void main(void) is still valid.
 
Originally posted by Tlaloc
actually if main doesn't return anything it's:

void main()

void main(void) <-- means it doesn't receive or return anything
My question is: Why would you need to use void main() or void main(void) in a program?

BTW, thanks for the info guys heh. It's still HL2 related :p

C'mon for the string 'tomorrow' ! woot.
 
Main is always void (or should be) it does not return anything so why make it an int. Void is just a common practice more that anything sort of like a return at the end that does not do anything as it will exit fine without the return.

It just looks better and is technically more correct.
 
Ares : if (HL2Release = OneMonth)
== <- return learning c :D
 
Originally posted by -Yo-
Ares : if (HL2Release = OneMonth)
== <- return learning c :D
I don't know if you've read it or not, but we've already gone over it :p
Also, the '=' instead of the '==' was a goof up - I thought I upt == but I guess I didn't hehe (same with the '\n'). I'm learnin man.. I'm learning (C++)
 
Back
Top