Jump to content

  • Log In with Google      Sign In   
  • Create Account


Check Out This Awesome C++ Lesson


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
24 replies to this topic

#1 Beem   Members   -  Reputation: 127

Posted 18 November 2012 - 07:45 PM

I taught my friend C++ over Steam chat, here's how it went.. Enjoy.

5:37 PM - Jack: Also you need to put semicolons all over the place.
5:37 PM - Jack: There's not much ryhme or reason as to where you put them, but trsut me, you need them.
5:39 PM - Scamster: Posted Image
5:40 PM - Jack: Whenever some comes to me and says their game is broekn, I tell them it's probably a semicolon, and it almost always is.
5:40 PM - Jack: No why I say there is no rhym or reason is because...
5:40 PM - Jack: class SomeClas { }; <= needs semicolon
5:40 PM - Jack: but
5:41 PM - Jack: namespace SomeNamesapce {} <= doesn't ened semicolon.
5:41 PM - Jack: And...
5:41 PM - Jack: switch(somevalue){} <= doesn't need semicolon.
5:41 PM - Jack: but.
5:41 PM - Jack: enum SOMENUM{}; <= needs semicolon.
5:41 PM - Jack: Also
5:41 PM - Jack: for(int i=0; i<3; i++){} <= has semicolons in weird places, but doesn't need one at the end.
5:42 PM - Jack: What's alright though is if you add a semicolon where you don't need one, in many cases it's okay.
5:42 PM - Jack: not the namespace one thugh.

Edited by Beem, 18 November 2012 - 07:45 PM.


Sponsor:

#2 Alan Greenspan   Banned   -  Reputation: -6

Posted 22 November 2012 - 06:52 PM

Wow. You're funny. Not.

#3 Cornstalks   Crossbones+   -  Reputation: 6974

Posted 22 November 2012 - 07:08 PM

Wow. You're funny. Not.

Wow. You're funny. Not.

@OP: I appreciated it :)
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#4 Alan Greenspan   Banned   -  Reputation: -6

Posted 22 November 2012 - 07:35 PM


Wow. You're funny. Not.

Wow. You're funny. Not.

@OP: I appreciated it Posted Image


You've got to be kidding me, this sounds like a joke some tween who just started learning C++ made to his friend who knows nothing about programming.

#5 Cornstalks   Crossbones+   -  Reputation: 6974

Posted 22 November 2012 - 08:49 PM



Wow. You're funny. Not.

Wow. You're funny. Not.

@OP: I appreciated it Posted Image


You've got to be kidding me, this sounds like a joke some tween who just started learning C++ made to his friend who knows nothing about programming.

I have a decent response for that, but I'm not going to feed the troll. It just sucks you have to be a kill joy on this site.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#6 Shippou   Members   -  Reputation: 1471

Posted 22 November 2012 - 11:21 PM

Killing joy is my job here: Posted Image

In responce to OP - Interesting topic, but I fail to see the humor in the post

 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 


#7 Bacterius   Crossbones+   -  Reputation: 8312

Posted 23 November 2012 - 01:40 AM

It's not really funny (at least to me, and I know a bit of C++) because semicolons in C++ actually have do a rhyme and reason to them, except perhaps the namespace one. But that's just my opinion, no one else's and unlike the (now banned) member above, I do not draw unwarranted conclusions from it.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#8 slicer4ever   Crossbones+   -  Reputation: 3387

Posted 23 November 2012 - 01:57 AM

not really sure what the OP is attempting to do here, humor seems to be the objective, but i personally don't really see any here...and truly hope he's not being sincere.
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#9 way2lazy2care   Members   -  Reputation: 782

Posted 23 November 2012 - 07:16 AM

I smiled and then remembered it was morning. It's generally much better advice than any advice I would have given when I was starting ("Just keep trying to turn all the *s into &s or ->s until it compiles").

#10 SymLinked   Members   -  Reputation: 837

Posted 23 November 2012 - 09:37 AM

5:40 PM - Jack: Whenever some comes to me and says their game is broekn, I tell them it's probably a semicolon, and it almost always is.


Like that would break their game. It won't even compile.
Not funny. Posted Image

#11 Madhed   Crossbones+   -  Reputation: 2681

Posted 23 November 2012 - 09:51 AM

5:40 PM - Jack: Whenever some comes to me and says their game is broekn, I tell them it's probably a semicolon, and it almost always is.


im hertbroekn

Posted Image

#12 Servant of the Lord   Crossbones+   -  Reputation: 18099

Posted 23 November 2012 - 12:52 PM

Killing joy is my job here: Posted Image

That's very hard to do when you have an utterly adorable red fox as your avatar. Posted Image

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#13 Shippou   Members   -  Reputation: 1471

Posted 23 November 2012 - 04:22 PM


Killing joy is my job here: Posted Image

That's very hard to do when you have an utterly adorable red fox as your avatar. Posted Image

I need a more menacing avatar ....

 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 


#14 phantom   Moderators   -  Reputation: 6891

Posted 23 November 2012 - 05:33 PM

Someone called for a menacing avatar? ^_^

#15 JTippetts   Moderators   -  Reputation: 8255

Posted 23 November 2012 - 06:15 PM

Someone called for a menacing avatar? Posted Image


y helo thar

#16 phantom   Moderators   -  Reputation: 6891

Posted 23 November 2012 - 07:25 PM

y helo thar


s'up...

#17 L. Spiro   Crossbones+   -  Reputation: 12873

Posted 23 November 2012 - 08:38 PM

I need a more menacing avatar ....

Rawr.

Consider yourself avatar-menaced.

What I find funniest about this topic is that Alan Greenspan was banned. Was it because of this topic or was there another topic somewhere where a moderator told him off before banning? Can’t view his profile to check his posts to find it.


L. Spiro

Edited by L. Spiro, 23 November 2012 - 08:41 PM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#18 azonicrider   Members   -  Reputation: 421

Posted 23 November 2012 - 09:24 PM

Wow I now know C++, god its such a relief to check that off the list.

Easiest way to make games, I love LÖVE && My dev blog/project

 

*Too lazy to renew domain, ignore above links


#19 Cornstalks   Crossbones+   -  Reputation: 6974

Posted 23 November 2012 - 09:53 PM

What I find funniest about this topic is that Alan Greenspan was banned. Was it because of this topic or was there another topic somewhere where a moderator told him off before banning? Can’t view his profile to check his posts to find it.

He was a GameDev troll who's been around before. Thread 1. Thread 2. Thread 3 (likely him). Thread 4 (his post was deleted in this one, but it's been quoted). etc. These are just the ones I can find with a quick google. I don't know if there were any private messages or stuff, though.

I'm surprised this thread went the way it did and didn't turn into something like this... But I've not been disappointed.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#20 ApochPiQ   Moderators   -  Reputation: 14660

Posted 24 November 2012 - 01:38 AM

There's perfect reason to the semicolon rules in C/C++.


You need a semicolon after a } any time you are working with something that can be instantiated. Otherwise, you don't.

This is to support the following syntax:

struct Foo
{
     int member;
} InstanceOfFoo;

InstanceOfFoo.member = 42;


Can you instantiate structs? Check. Classes? Check. Enums? Check. Namespaces? Nope! Therefore, namespace does not need a trailing semicolon. (For that matter, functions and the bodies of code blocks follow the same pattern.)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS