Jump to content
  • Advertisement
Sign in to follow this  
jordi_0071

C++ too difficult

This topic is 5051 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
You may find D language a bit easier than C++, but not by much. It is like C++ without the crud.

www.digitalmars.com/d

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
BlitzMax -- a hybrid BASIC/C/Pascal language with OO features. Cross-platform too.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I personally learned C/C++ first in my teens without any previous programming experience. And yes, it did have all sorts of complications. The main difficulty I really didnt understand was THINKING with a programming mindset, which is something that suddenly clicks "Oooooooh, I get it". Such as, understanding why a program depends on looping. If your having difficulty with C++, I'm willing to bet you would do better if you purchased at least one more book on the basics of C/C++. Take every chapter very slowly and as indepth as you can, study every example, try making your own variations on what the chapter is teaching, however simple it is, and most importantly do all the exercizes at the end of each chapter (hopefully your books have some).

You dont have to try to memorize syntax, like dont beat yourself to death trying to remember how to initialize functions just use a book for referance. As you keep using everything, you will indirectly memorize how to do things. The important thing is you understand all the programming concepts, so that if you want to achieve some specific goal (such as, printing out a number 100 times, starting from zero and going up once each time) you have enough of a concept on how to do it (like, ok I need to use a for loop, let me check back on how to use it).

Dont listen to anything relating to performance, in the learning stages you really wont be making programs that needs to milk every little bit of the cpu cycle it can. And once you understand how to program with one language, picking up on another is very simple because you understand the concepts and are just learning new syntax. Only real downside with the whole c/c++ is how much additional learning you will need if you want to do graphics/sound and all that fun stuff through api's like directx, and even the most basic win32 api code to just start your program in fullscreen so you can do your graphics will look insanely cryptic for a looong time, so just know it's going to be a bit of a long process.

Share this post


Link to post
Share on other sites
start with 'C'. this will make it easier to understand why C++ is useful. then go onto learning to use C++ and OOP. when your good with C++, learn a graphics API of your choice (OpenGL for me).

thats my direct, short, no messing, learning useless languages route :)

PS im sure others won't agree hehe...

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
BlitzMax -- a hybrid BASIC/C/Pascal language with OO features. Cross-platform too.


if this is the latest edition from the makers of BlitzBasic, then its good. but im my opinion, only for making prototypes of your games and to see the basic functionality. its not particularly optimized and its not as highly customizable as a good DIY in C++/OpenGL/DirectX. just my 2 cents ;)

PS i bought BlitzBasic and Blitz3D. both are cool hehe.

Share this post


Link to post
Share on other sites
Quote:
hey i find C++ too difficult, but i still want to program. If i'm good then i want to create games, but wich language is easy too learn, and i dont mean anything like Qbasic or visual basic.


Why do you think it's too difficult?

How have you been trying to learn C++?

Try and stick with C++ :)

Don't just try and learn from somebody's online tutorial. Read some actual paper books.

I've found online that you shouldn't really listen to people on these forums about stuff that will affect your next months/years/dreams about programming. Although this is one of the more friendly ones (I think rating system is a big motivator/helper for that and moderators of course!).

But listen to me though! :p
Ya I just contradicted myself...

These are some of the common things I see online related to "C++ learning" gotten from web site watching, IRC hanging, newsgroup lurking...

There's a lot of people that will tell a 'newbie' to read the hardest book they've ever read or maybe just heard of...to make themselves seem more 1337 ;-)
I'd estimate that as maybe 75% of the people.

A smaller part of whats left of the 25% opinions are people who are so dumb/ignorant they really don't know what advice to give. Maybe 10%.

Then another 10% are so brilliant that they assume that everybody is as bright as them and should be reading the hardest stuff first.

I'd like to think that I'm in the 5% left =)

Don't listen to people who say don't read this book...like don't read For Dummies or Teach Yourself in X Days...

Don't listen to the people who tell you to read The C++ Programming Language as your first book and other advanced books.

Find some books you like and read them! Not a tutorial that might have errors and LIKELY isn't written by a professional WRITER no matter how great they are in whatever language.

Give C++ a real shot. If you are serious about it go to a bookstore or online used books even and buy a C++ beginner book. And not just one either. People who think they know C++ from one book don't.

I've read like 20+ computer related books as a hobbyist over the years and at least 6 of them just of C++ (recently too). And I consider myself a low intermediate (opposed to a high intermediate :).

Yes, there's a lot to learn of C++ it is NOT easy to be really really good at it. But it also is NOT that hard to learn. And you can write console based stuff (barely knowing what you really are doing maybe) after half a book :)

(PAUSE)

Now I'm thinking maybe I'm not qualified to give this information LOL. I'm by no means a C++/OOP expert. But I don't think I'm a one book newbie anymore either.
I know what an abstract data member is and how to put my new data types in the stack memory and I can read/understand C++ code I download from online (unless the writer is trying to make it difficult to read on purpose!) and YOU can know that too in just a few months/books! :)

Summary: Anyways, the point is don't just read a online tutorial or one book and give up on C++. And don't listen to somebody trying to sound like an expert and tells you to go read X book and then you try and read it and can't understand it and give up. There's like 1,000 C++ books out there find a really easy one and start with it.

I'd recommend: C++ Demystified and also OOP Demystified as first two books.

Those two books are really newbie friendly I think.

Good luck.

Share this post


Link to post
Share on other sites
I started with Visual Basic. (6 and .net) Shortly after that I moved on to Python, then Common Lisp and C.

What I found with Visual Basic is that when I was programming with Visual Basic 6 and moved on to Visual Basic .net, I was pretty much starting all over again from the beginning. When I switched from .net to Python, I was once again largely starting all over again. I would not recommend visual basic as a starting language.

I think that Python serves that purpose well, it's easy to learn and the abstractions that it provides make a lot of sense, which makes C much easier to learn after experience with Python. The documentation is excellent as well.

However, I'd still have to recommend C as a starting language provided that the student is dedicated and understands that programming is difficult and takes a long time to master. When you start with a language that is as abstract as Python and Visual Basic are, I believe that you are building your programming foundation on quicksand. You don't *really* understand what you're doing. I believe that if you let that be true for long enough, you seriously limit your potential as a programmer. Eventually you're going to develop your own limited concept of what programming is and you aren't going to want to go back and learn about things like pointers, and even if you do, you probably wont really understand them. A lot of programmers are content with that, they don't see the need to learn about these low level problems that they consider solved. I think that is terribly wasteful. If all you can do is write programs in languages like Java and C# and Visual Basic, are you really a programmer? I think that you need more than that. The best programmers are many times more productive than the merely average. Why? I think it's because they are passionate about programming. They're willing to learn the things that the drones call useless and esoteric, because these things make them better programmers, and they see that as a worthy goal in and of itself. They aren't motivated only by what will help them get a job. The thought may not even enter their minds.

To the original poster: If you make your choices based on how hard they are instead of how interested you are, you will not be one of the people that I am describing. Programming is hard, that's the reality of it, and it takes years to become good at it. Just as an athlete must exercise their body to become an exceptional athlete, you must exercise your mind to become an expert programmer.

Share this post


Link to post
Share on other sites
If you're finding C++ too difficult, I'd strongly suggest Python(and PyGame, obviously).

And if you want reasons..

..It's named after Monty Python for heavens sake! [totally]

Share this post


Link to post
Share on other sites
read "programming in the key of c#" and you'll understand why c/c++ is so hard for most people.
to quote the book:
"These languages achieve this efficiency by assuming the programmer is very smart and doesn't make mistakes; the languages themselves don't provide any checks to determine if the program is doing anything wrong, such as accessing memory it shouldn't be accessing. C and C++ programs may be fast, but they can often have bugs that are difficult to diagnose"
I suggest going through an easier language as was suggested then giving c++ another shot afterwards.

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
"These languages achieve this efficiency by assuming the programmer is very smart and doesn't make mistakes"

I couldn't agree more. I've programmed one game using Borland C++ Builder and my main problem with the C++ language was that you have to do a lot of stuff yourself. Things that the Delphi or BlitzBasic etc. compiler automatically do for you, like array index checking, memory cleanup etc. And the unique C++ language features offered, like operator overloading, are really counter-intuitive IMHO.

I think in general you can say, that with C++ you end up spending 50% of the time solving problems related to the programming language (memory management, operators, header-files and the order in which to include them, etc.), and 50% of the time solving your own game-programming "problems" (like collision detection, high-score sorting, attack patterns etc.)

So anyway, if you're just interested in game-programming then i can highly recommend Blitz Basic and its successor Blitz 3D [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!