Just what the title says. I spend about a month learning the basics of C++ but then got stuck on function (class). If anyone could explain that would be great.
Also, what is a good C++ compiler for windows 7 home premium 64 bit? Thanks.
As for learning, there are tons of stuff up on youtube if you're a visual person. If not, just try to get the basics from there then just go out on your own a start a small project and slowly build new thing into it as you learn them from the internet.
As for a compiler, Visual Studios works nicely if you can get your hands on it.
As for classes, expand on where you're confused. Do you understand Structures yet? If not start with those.
I use Code::Blocks my young friend. There are a ton of free c++ compilers out there. Code::Blocks is a solid performer as far as Im concerned. Ive written tons of programs with it. It also comes with a good IDE. Fairly easy to use.
Your question is about functions? I was curious as to why you put (class) after it.
As Sanity stated, Dev-C++ is also very good. I will have to disagree with my friend Sanity on the subject of starting with C. Back in the early 90s, my first language I learned was C++. Yo can go any route you wish. C, C++. Its all good.
C is a simpler language syntactically, but is a much more difficult language conceptually because it immediately forces you into very low level concepts. Higher level languages are typically better to learn the basics of programming from... then once you get a grip on the basics you can learn about the more complex lower level details exposed in languages like C and C++.
Right out I will say that C or C++ are both very difficult languages and probably not the best first language to learn. That doesn't mean it's impossible to learn them first (I learned C++ as my first language and I turned out pretty well), but it's probably not the easiest route to go.
An extremely high level language like Python is probably a good intro language. Once you get an idea of how programming works from dinking around in Python, then you'll have a much easier time diving into a more complex language like C++.
But that's just my opinion. I've heard other people say the exact opposite.. that people should start low level (assembly) and work their way up. Personally I think that's insane, though.
I don't agree with the "learn C first" policy.
C is a simpler language syntactically, but is a much more difficult language conceptually because it immediately forces you into very low level concepts
I would not say that C is more difficult language than C++. Quite the contrary C is simpler than C++ because most of programmers do not understand OOP and think that using OOP syntaxic constructions is the OOP itself. You can write OOP programs in C because OOP is not some set of syntaxic language constructions. It is some general approach to writing programs.
But in any case there is no necessity to learn at first C because as correctly mentioned @cire C and C++ are two different languages though have many in common.
Writing OOP is more difficult, yes. But using OOP is not.
Compare using std::string and std::vector vs. using char arrays and mallocing your own arrays.
C++ is multiparadigm so you don't have to write OOP code with it. You can write a procedural program (and in fact, that's a very good way to start with the language). But while doing so, you can take advantage of OOP by using pre-made classes, both in the standard library and in other external libraries. That makes it much eaiser to start doing more advanced things more quickly.
you will be good at this in no time, things seem tough at first but they get easy and then you come across the next thing and then its hard but that clears up too and so on...i heard theres a lot of finding new stuff to learn at all times though, which is also great.
your good at something when you are better than everyone else XD
the only way to be better than everyone else at something is to start young and keep practicing...i have regrets about not sticking to learning the same thing and practicing regularly guitar basketball programming you name it shud have stuck with it
Dev C++ is and outdated and buggy compiler. I wouldn't suggest using it. Microsoft Visual C++ 2010 Express is a good free compiler. It's only disadvantage is that it can't be used commercially, but that's okay.
I learned quite a bit from this thread. xD Thanks.
Sadly I have to admit about 95% of my programming skill comes from school. I wish I had the ambition as a child to get a nice foundation in it on my own. And schools will always teach you the simpler languages first; they teach you C then build that into C++, really making it seem like it's just a more advanced version of it (I however learned java first). And after taking 1.5 years of java then having to sit through Visual Basic (where the program did all the work), I think I can see how starting complex and working toward the simple is effective. <3's
e/ Ya, and my info on Dev C++ was from a couple years ago. I've never used anything outside of Textpad and VS, and textpad is just meh.
Feel free to ignore this if you already know about it, but if you use google chrome, you might want to take a look at sourceLair. With sourceLair, you don't even have to install anything- you can just run things from your browser. I've been fooling around with it this morning, and I'm pretty impressed. Of course, I'm a first semester CS student, so I'm easily impressed. Still though, if you're looking for something super easy to get started with, that might be just what you're looking for. Good luck!