- Viewing Profile: Reputation: Sid_TheBeginner
Community Stats
- Group Members
- Active Posts 35
- Profile Views 727
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
User Tools
Latest Visitors
#4953959 Looking for a friend / tutor.
Posted by Sid_TheBeginner
on 29 June 2012 - 08:11 AM
--Sid
#4952512 total noob here. Can you recommend a c++ compiler?
Posted by Sid_TheBeginner
on 24 June 2012 - 08:03 PM
#4952329 Newbie
Posted by Sid_TheBeginner
on 24 June 2012 - 09:04 AM
I agree with that guy. (Only watched the first part).
And I did start with a game-specific language (AMOS, which I dare assume is game-specific), but I was a kid and I didn't have a choice, it was all that was available to me at that time. I think I would've been better off going straight to C or C++. To me, it doesn't feel like knowing a game-specific language actually means you know programming. It feels like you're very much limited, and even worse, oyu may become too comfortable in it to ever progress outside of it, though I'm hoping few people would have such a problem.
Yeah, I watched all the 3 parts before a few days and that's why decided to start learning C++ because I've no clue about what is what and so I decided to take this guy's words by heart.
#4952314 Newbie
Posted by Sid_TheBeginner
on 24 June 2012 - 08:00 AM
Watch all the 3 short parts. This guy truly seems to know his stuff.
#4952226 Please simplify my code.
Posted by Sid_TheBeginner
on 23 June 2012 - 10:22 PM
OK, let me start by saying this, very clearly: This is not C++. This is C. You should learn C++ instead. What book or reference are you using, which claims that this is C++? Throw it out the window, whether literal or virtual, and get a reference of C++ instead.
C++ is an object-oriented programming language. This means that you should look at things as real-world object, created from blueprints called classes (or structs). If you have a game with a slot-machine, then that slot machine is an object, I think you'd agree. (In fact, the game itself is an object, isn't it?) So what you need to do is to write a class called SlotMachine, and create an object from that class. And pulling the lever on a slot machine should be represented as a member function (or a "method", as it's called in some languages) of the SlotMachine class. So when you want to pull the lever, you write slotMachine.pullLever().
You have pretty much crammed everything into the main() function. That is not the C++ way, but the C way.
I'd love to re-write it all in C++ for you, but... well, I think you should do it, frankly. Otherwise you'd not be learning, I think.
EDIT:
Oh, don't get me wrong, I'll help you if you need it, and I'm sure others here will aswell. Just try some on your own, with a decent C++ reference in your back, and if you run into problems, we're here.
Just... start over, and do it in C++.
Sorry I've no clue what your talking about. Seems its advanced stuff.
I don't know about "advanced", it's what C++ was created for. It's pretty much the whole point of it, as an improvement upon C. If you want to learn C++, you need to start right away. If you want to use C instead, then that's a choice you need to make, but you need to be aware of the difference. I don't know if all these other guys thinks I'm just messing with you or something, but I think that once you look at the code example I attached to my other post, you'll understand that C++ is slightly different from C. Hopefully you other guys would care to listen to me and see the truth in what I'm saying instead of jsut downvoting me as if I was trolling. I, for one, am trying to teach a newbie the proper way to code, and good practices. I don't know what the rest of you are trying to do.
Your code works amazingly well
- Home
- » Viewing Profile: Reputation: Sid_TheBeginner

Find content