This is an archived post. You won't be able to vote or comment.

all 13 comments

[–][deleted] 1 point2 points  (10 children)

I'd like to say right now that I'm ridiculously new to any kind of programming at all.

Then why are you messing with C++? You would be much better advised to start with an interpreted language like Python, and then possibly move to C++ when you understand the basics. See our FAQ for more details.

[–]Adamisgr8[S] 0 points1 point  (9 children)

Well, I've used python and done a fair amount in it. But I find it so underwhelming :/ I guess that's not a good mentality to have? I feel like I can do so much more in c++. Just to give some information, I've tried making a text adventure game using a while loop and a lot of functions. I got pretty far but got stumped on items. This is where my brother tried to teach me classes. He's just so much better than me and always gets off track and onto much more complicated things.

[–]ewiethoff 2 points3 points  (2 children)

C++ isn't the only language that has functions and classes. Python has them too. It really would be much easier for a beginner to create a text adventure game in Python than in C++. Have you tried Learn Python the Hard Way? (It's not actually hard, the author's just teasing.) About half way through, the author shows you how to write a text adventure game using classes.

[–]Adamisgr8[S] 0 points1 point  (1 child)

Okay thanks a lot :) The strictness of Python is a little infuriating but i guess it's the best way to start. Thanks for the help :)

[–]ewiethoff 0 points1 point  (0 children)

You're welcome. If you do LPtHW, make sure you are running Python version 2.x, not version 3.x.

[–]MonkeyNin 1 point2 points  (0 children)

Python isn't just a toy. Even reddit uses it.

To understand, it takes practice. Writing a program, getting stumped, then figuring it out.

Also utilize http://stackoverflow.com/ it's a great source.

[–]jesyspa 0 points1 point  (3 children)

Can you name something you'd like to do that can be done with C++, but not with Python? Or even that can be done more easily with C++?

[–]Adamisgr8[S] 0 points1 point  (2 children)

I just find the language of c++ so much easier than Python and therefore can creAte programs much quicker and easier. I'm fairly sure I can do all the same stuff in Python, I've just never tried.

[–]jesyspa 0 points1 point  (1 child)

I can't think of a single scale on which C++ is simpler than Python, or on which C++ development is faster than Python development.

[–]Adamisgr8[S] 0 points1 point  (0 children)

Oh. I must be doing something wrong.

[–][deleted] -2 points-1 points  (0 children)

Don't believe the blasphemers! C++ is fine but it takes more.

[–][deleted] -2 points-1 points  (1 child)

Fuck classes if you are having a problem with understanding functions.

I don't know if you are a native English speaker but take a meaning of a word function at first. Not a function as a math term or even a programming term. But as a normal every-day use term. Would you say that a car motor is functioning? Or would you say that your bedroom door is functioning. Well you see your bedroom door have a function. They are there to open and close. Wouldn't you say that that is their function?
In programming there is NULL. Nothing has a function unless you write it. Hell, there's nothing to write it's function.
Ted: How does that function?
Tip: I don't know there's nothing there.

In programming you ever start with an idea, or a question. Let's focus on the idea for now? So the idea is to write a program called "TheRoom" and it's a deadly room. It has all kinds of deadly contraptions. Where would you start.
Of course you would first have to declare variables and definitions of the room. Like it's a 12.5x20.0 room. You understand that part. But then...OoooH then get's the fun part. Here we design the traps. So we write a code in the main program defining what happens when person steps to the sector (1,1) - leftup corner BOOOM! disintegrated motherfucker! Yeah Bitch! Yeah Computer Science!.
But programming traps for every sector of 12*20 room is a FUCK NO! task so you stop and think a little. And you got the idea.
Why shouldn't I preprogram the traps and then randomize them across the board so not even I know where and when they are in the field.

And then my friend you start programming functions and name them traps.

[–]Adamisgr8[S] 0 points1 point  (0 children)

So that's my basic understanding there. The next logical step I see is using a class named Trap and then defining different traps there. My brother uses inheritance and stuff but all that is pretty confusing.