I am new to programming but when I took my class on Visual Basic it seemed so easy and I learned it so fast. It seemed like a giant puzzle. Now I am taking a introduction course to C++ and I cannot seem to grasp the material at all. When I ask for help from my teacher he just says, "If you can learn one programming language, you can learn them all." I was just wondering if anyone else had this problem starting out and does it get any better from here? I'm very discouraged.

What your teacher said is true to some extent, a lot of programming techniques are applicable to multiple languages. This does not mean that every language is equally easy to learn. C and C++ are lower languages than languages like VB, java etc. generally this also means that are harder to understand. Compare it to Assembly language, which is the lowest 'humanly readable' language.. and it's much harder to understand than C/C++.

Also, you say VB seems easy to you... but getting a program to work does not mean it's correct, you may have used bad or ineffecient techniques or only aimed at small problems: there are aspects of VB that are difficult to grasp as well.

So don't give up on C++ just because it seems so different/difficult at start... if you really love programming you will get through it and appreciate the power of C++ ;).

Thanks. I probably worded that wrong. Visual Basic wasn't actually easy...just easier than C++ (to me). I felt like I had to work forever and I have worked through several books on Visual Basic for practice but eventually I figured every project out. To my suprise a lot of the code matched the answer code that came with the books when I checked my work. It just seems like the harder I work on C++, the farther away I get from the correct answer...or any answer at all.

Well I can imagine that, I work closely together with a VB.net programmer and in the beginning she had more trouble understanding my code than I had understanding hers.

However, now she can follow most of what I write eventhough she hasn't written a line of C in years.

So I think the answer is that C++ is generally more difficult and will take more time to grasp... but when you do you have something powerful at the tip of your fingers ;).

(One thing that C++ does a lot is leaving the programmer to decide how to approach a problem... the same goal can be achieved in many many ways which to me was also very confusing when I started).

There is truth to your instructor's statement. Nearly all programming languages are composed of keywords that implement datatypes, hardware control, logic, etc. The difference is the words and symbols that are used to implement the logic and the rules that the statements must follow.

Logic is logic is logic is logic, what changes is the logic subset and the keywords. Some languages (such as Java) only implement for and while loops. Others may implement for, do, and while loops (some BASIC dialects, C/C++). Still others may implement something else completely off the wall. Regardless, it is all logic, if a condition is true, a condition is true, if it's false, it's false.

What you need to do is learn to draw parallels between the syntax you already know (VB) and the syntax you don't (C/C++). For example, these are equivalent statements:

dim aNumber as integer = 15
int aNumber = 15;

They both declare and initialize an integer called "aNumber".

Edited 6 Years Ago by Fbody: n/a

It's not as hard as it can be made out to be when i first started anything near coding i learned html then a tiny bit of css and then jumped to c(i really should have learned this one more before jumping to c++ but ..) and then to c++
two invaluable resources i used (its been awhile i don't remember if DW will let me post links or not but not to be rude i will post them as they will help further Op's knowledge of the basics and some advanced concepts)
C tutorials (start with this one first In my opinion it will ease the transition to c++)
C++ tutorials
They are both valuable resources and helped me learn the language pretty quick not as fast as some would like but you can't learn something in a few hours what a couple of months practice takes.

> Why does C++ seem more complicated than Visual Basic?

Because it *is* more complicated than Visual Basic.

But you don't need to be extraordinarily brilliant to learn C++ and to use C++ effectively. Almost all programmers who make a genuine attempt to become good C++ programmers do succeed in their attempts. In a reasonable period of time, which is more than what is required for, say, Visual Basic. The world is complex, some problems are hard, and the tools we use to solve those difficult problems are necessarily more complex.

I found VB Somehow confusing to me as beginner (Check my first posts), and I moved on with Python and PHP and then C++. I think the only confusing points is when you come to pointers. They are somehow confusing but the other stuffs are somehow simpler.

Many says VB is easy, are referring to GUI drag and drop. But that is even available in C++ using libraries (wxWidgets with Dialog blocks or wxSmith or wxFormbuilder: QT with QTCreator: GTKmm with libglade et al)

So I hope it is not that harder ;)

Comments
sucks balls

I appreciate all of the feedback that I have been given. I understand that it takes practice and that it is something that I can learn if I keep trying. I think I just needed to hear that. :)

What part of C++ troubles you, my young lad?

The thing that troubles me the most I believe is that a lot of the problems that I have to program are complicated to figure out in the first place. I agree with what thelamb said above : (One thing that C++ does a lot is leaving the programmer to decide how to approach a problem... the same goal can be achieved in many many ways which to me was also very confusing when I started).

When you get a complicated problem, the best tool to start with is a pen and paper (or word processor if you prefer). Write down how you think you would solve the problem, then start translating your thoughts into an algorithm. If it looks feasible, move on to translating to code, if not, back to the drawing board. Many times you will find that it's 2 steps forward and 1 step back when you are working on a project.

Edited 6 Years Ago by Fbody: n/a

When you get a complicated problem, the best tool to start with is a pen and paper (or word processor if you prefer). Write down how you think you would solve the problem, then start translating your thoughts into an algorithm. If it looks feasible, move on to translating to code, if not, back to the drawing board. Many times you will find that it's 2 steps forward and 1 step back when you are working on a project.

UML is helpful, especiall Use case and class diagrams

Yes, UML is a useful tool, but not everyone knows it. I consider it a mistake to assume that someone does know it. I certainly don't know it, but I'm picking up bits and pieces here and there.

Plus, in my limited experience and for all intents and purposes, it's essentially a pen-and-paper tool that's frequently virtuallized.

Edited 6 Years Ago by Fbody: n/a

This question has already been answered. Start a new discussion instead.