Sign in to follow this  
Followers 0
buttnakedhippie

How did you learn C++?

32 posts in this topic

I started a implement a FE-solver + UI in c++ as my first c++ project ( 2001 with MFC, not the best choise as a first project I have to say ).

 

So I had a target, motivation and a hard timeline. Then I looked into the concepts provided by c++ which seem to be the best approach and played around with it until it worked.

 

In my experience it is much easier to learn a new language with a real project than just reading a book. You can transfer the stuff you read into a real solution which solves a real problem. And you can lear how the toolchain works. 

 

Hope that helps ...

 

Kim

2

Share this post


Link to post
Share on other sites

C++ is not that hard in dos time. When I learn pascal and then move to C++, it's not that different. Because in Pascal u still can use OOP...

But things get so headache when windows release! To write a hello world app (with form) , it need 100-200 code line...No internet, only thick book, that really scare me. Sometime I just type 1-> 2 page of code then run to see what it really does. 

 

Now it's a lot more easy, we have tons of sample, tutorial on net, that no need to type anything at all, just build and see what happen ! 

-1

Share this post


Link to post
Share on other sites

I bought Sam's Teach Yourself C++ in 24 hours. Probably it wasnt the best book..... (It was the only available book in the shop).

With it and xoax.net (video tutorials), I was finaly able to compile and run my applications.

 

I used the lessons to learn how to program and then I would apply my new knowledge by building something small. 

As I got more confident, I started making my own text based games. The book became a reference when I got stuck.

 

Like Kimmi said, its much better to learn something by appling the knowledge to a project.

Start small with console based applications to concentrate more on the standard library and the languange.

0

Share this post


Link to post
Share on other sites

I haven't learend C++ yet, but I first read accelerated C++ about 10 years ago.. After that I've read lots of C++ and programming books, got a computer science degree and have been working with C++ for 4 years now.. I'm also reading lots of articles.. Thats the great thing about it, always something new to learn :)

0

Share this post


Link to post
Share on other sites

Now it's a lot more easy, we have tons of sample, tutorial on net, that no need to type anything at all, just build and see what happen !

this is equivalent to i've learnt how to read, highlight text, browse the net and use ctrl+c and ctrl+v very well!

C++ is not that hard . . .

it may not be hard but it can get confusing.
-3

Share this post


Link to post
Share on other sites

At university I bought Visual C++ 1.0; must have been 1993. By that time, several printed manuals (10 or more) were included, one of them containing a very well written introduction to C++ (from C to C++).

0

Share this post


Link to post
Share on other sites

I learned the language by reading tutorials, articles and editing examples from the internet. Also trying out some small things is a good idea from time to time. But I think the way of learning greatly depends on the person. But I think learning how to learn using the internet can be a very useful skill, even if it may take longer.

1

Share this post


Link to post
Share on other sites
I tried to learn C++ on my own twice in the 90s and I failed miserably. Then I got a job where C++ was used and I learned it relatively quickly. One thing that helped a lot was having access to a C++ guru down the hall. Oh, and nobody cared that I didn't know C++ in my job interview: My interviewers were satisfied because I could solve problems and I could program in C.
1

Share this post


Link to post
Share on other sites

I started with learning C++. I used BASIC for two years while in 7th and 8th grades and in my freshman year of high school I bought C++ for DUMMIES and started learning it (DJGPP/Rhide). Been programming in C++ for nearly 20 years now and to this day I still consider myself a beginner because I know there is always something new to learn. Since learning C++, I have dabbled with learning a multitude of other languages, but have gone back to learning C++ (C++ Primer 5th Ed) to make sure I haven't missed anything that may have changed as I didn't proactively stay up-to-date as I should have in those 20 years.

0

Share this post


Link to post
Share on other sites

Coming from Pascal/Delphi/ASM I was terrified of C++ in the first place, for many reasons. Then the Quake2 source was released, so I stayed up all night and roamed the city on sunday morning to get a copy of VC6. Compiling and editing my favorite game was an almost orgastic experience at the time. But I bit the bullet and became reasonably proficient with C++ over the years. Never looked back to Delphi (which was on a dead end anyway, but still is one of the greatest IDE's of all time).

0

Share this post


Link to post
Share on other sites

I was initially studying Business IT at a university, but shortly in the second year, I decided this wasn't something I wanted to do and decided to stop and do something I like. I was already having a focus on game development and took some programming courses at this university (which was in Java) to fill up the year instead of doing nothing. During the first half year, I also started to learn myself C++ through a book: "Beginning game programming through C++".

 

I started to learn it myself for 2 reasons: The second half year I could enroll myself in a course that would revolve around programming an engine in C++ and the second reason was that I enrolled myself for a game development course at another university which required me to do an intake assignment in your favorite language. As I already knew the main programming language at that course would be C++, I figured I might as well start using that.

 

When I did that engine course, I didn't know a lot of C++. I did do some programming in Java, some basic C, VB.net and some of the C++ stuff from that book, but I felt like I was thrown into an ocean and could barely keep my head above water! Luckely it was a team assignment and my team members prevented me from drowning. It was certainly a big learning experience, but I wouldn't say the best one for me.

 

When I got accepted at the game development university I had a similar experience, except that I started at an empty ocean that was slowly filling up and I had a better chance of getting up to speed.

 

I don't think there is a best way of learning C++, or any other language for that matter. What seems to work for another doesn't always work for you. Some learn by being thrown into something, some learn by book, some by something in the middle, but the one thing that all these things have in common is simply to do it. 

 

In other words: The how differs per person, as long as you do it.

0

Share this post


Link to post
Share on other sites

I learned C programming at Electronics school for microprocessors and microcontrollers, and at the time was writing computer games in DarkBASIC. I later felt the need to move to a more powerful language, and read a few books on C++ conventions. One such book which I feel defined my fundamental understanding of C++ was Moving from C to C++ by Greg Perry.

 

I write a lot of C++ code nowadays for small personal projects, and think that's really one of the only ways to gain a complete understanding of the language. Books help you a lot, but they won't get you anywhere if you don't practice.

0

Share this post


Link to post
Share on other sites
Much like a lot of other answers here, I learned c++ for university projects (statistical physics).

I think it's important to work on projects that interest you, to help you stay motivated, so try to think of a small project that will give you a buzz.

Also, remember that different people will solve a problem in different ways, and c++ is a multi-paradigm language. There's no substitute for doing your own coding, but it can also be an eye-opener to read someone else's code (assuming you trust their abilities of course.)

Most of all, have fun with it, and don't be scared to try and fail. Nobody has to see your early coding horrors! And nobody here will judge you badly for making mistakes. Good luck!
1

Share this post


Link to post
Share on other sites

While I used C++ for a few classes, I had no clue what I was doing until I worked in a team environment with others. Once I saw actual code doing useful things written by real coders, every line of code and every statement used all of the sudden had a clear rationale, and the whole language quickly made sense. Ever since then, I always learn new languages by just throwing myself into a code base. It works incredibly well for me, and I love being able to just change a line of code to see what happens.

0

Share this post


Link to post
Share on other sites

I went through a lot of tutorials like Learncpp.com and I thought I learned a lot. But I didn't really understand it until I started doing projectEuler puzzles.

0

Share this post


Link to post
Share on other sites

Yeah, never learn the lang alone. But learn it to do something! But as a pro programmer. I still think that searching skill is the most necessary thing. Sometime u dont need to know the lang to do the job. Just know what you want to do, and most the time, someone on the net did it already, or some part of it. Search it, download, build it, then tweak to see what it do (Instead of read the code, understand every line, then write your own! ). Because the code already running, so change something to see how it work is very easy to understand . That's the fastest way for me. Although if you write it your own u can understand it better, unless you are a student and have a lot of time to spend!

0

Share this post


Link to post
Share on other sites

I learned c++ basics from www.cppgameprogramming.com. After I read all the tutorials there, I switched over to this site and I must say, it wasn't a mistake! I almost wish I started here!

0

Share this post


Link to post
Share on other sites

The first time I saw C++ was at uni in two different and inadeguate courses, the first was more a C with some C++ elements (references, new, delete, and bad basic usage of iostream) and it didn't teach quite nothing (it was also bad explained too, without a comprehensive explanation of memory model, allocation, and everything else, so it wasn't a good course to lern C too..)... The second course was just a java introduction course explaining  "C with classes"...

So I really stared learning the basics of C++ with the Bruce Eckel's books giving me decent basis for C++98/03 (you can find them as free electronic versions). The rest I learnt (and I'm still learning) comes from websites... I'm actually evaluating the purchase of last Bjarne Stroustrup's book that covers C++11...

Edited by Alessio1989
0

Share this post


Link to post
Share on other sites

I learned C++ by struggling with it. Unlike Visual Basic and Java, C++ was a different beast to understand let alone master. While I never understood the deepest of C++ as in underneath the hood of C++ because I decided to pursue Java much more and make games with it. I understood Visual Basic and Java enough to at least understand the general programming concepts behind C++ which got me grade of a B in both C++ courses I took in college.

 

I think C++ is something you can only learned at a deeper level on your own or by discussing your roadblocks using C++ on a forum. I had professors who made things really confusing when pointers in C++ was introduced. 

Edited by warnexus
0

Share this post


Link to post
Share on other sites

I first learned C++ about 15 years ago. I started with C until I had a good grasp of the content and then moved to C++. A good book to have is "C++ A Complete Reference", then using websites like http://www.cplusplus.com/ that have nice tutorials.

0

Share this post


Link to post
Share on other sites

I was taught C at college (well, they gave me a textbook and a compiler). Sadly this was long after C++ was standardized but the lack of decent CS tutors in the UK means that the syllabus is still largely dictated by the available skills of staff rather than the real world, in smaller colleges at least.

 

Bizarrely, even though they were teaching us C, they had us using Borland C++ Builder, so the template code we were filling bits in on contained all sorts of gibberish that made no sense to me. The textbook they supplied had a small, very badly written appendix on C++ so a combination of that and curiosity about all this weird code Builder was generating made me start to experiment in my own time.

 

Thankfully I left the course before I wasted too much time learning outdated methods, and I wouldn't recommend learning C before C++. I spent a long time implementing my own string and vector classes which was a great way to learn about things like operator overloading and RAII, but produced terrible code. I'm fortunate that I was able, largely through activity on this site, to throw off most of the bad habits I got into in the early days.

 

Before I had even looked at C though, I had spent most of my life (from about aged 7 onwards) playing around with various BASICs. ZX Spectrum, followed by some game BASIC for the Amiga. It was very clear to me going into the course that having this fundamental understanding of things like variables, control flow, input etc gave me a big headstart on the students who had never programmed before.

 

I think we have to draw a distinction between learning programming, where the skills should allow you to move from one language to another easily, and learning the nuances of C++. Personally I think my basis in C made it easier to understand some of the peculiarities of C++. I'd already started playing around with writing simple compilers and virtual machines before I got into C++ and I find a bit of understanding of how compilers work under the hood helps make C++ make a bit more sense, but that isn't a requirement.

0

Share this post


Link to post
Share on other sites

Now it's a lot more easy, we have tons of sample, tutorial on net, that no need to type anything at all, just build and see what happen !

this is equivalent to i've learnt how to read, highlight text, browse the net and use ctrl+c and ctrl+v very well!

At least format the code with Artistic Style after you do all your copying and pasting, so that you can more easily read the code and learn something from it later. Maybe even modify and experiment with it.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0