• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

When learning C++ what did you find difficult?

Joined
5/7/14
Messages
8
Points
11
Just wondering, I'm learning it right now from one of the books suggested here, and lets just say its not the easiest thing I've tried, but I am getting it and I'm finding it interesting.
 
Last edited:
Main difficulty is fully expressing yourself using the language i.e. make good software.
 
Just wondering, I'm learning it right now from one of the books suggested here, and lets just say its not the easiest thing I've tried, but I am getting it and I'm finding it interesting.

Which book? It makes a helluva difference.
 
C++ is no different to any other programming language.

The most difficult for thing for me about learning to program was listening to computer scientists trying to explain simple concepts very badly.

After that was learning to structure programs so that they are easily read, developed, debugged, and extended.

The latter point is the single most important thing to learn as a programmer.
 
Unfortunately, CS tends to dissociate itself from reality.

A biologist, a statistician, a mathematician and a computer scientist are
on a photo-safari in Africa. They drive out into the savannah in their
jeep, stop and scour the horizon with their binoculars.
The biologist: "Look! There's a herd of zebras! And there, in the middle:
a white zebra! It's fantastic! There are white zebras! We'll be famous!"
The statistician:
"It's not significant. We only know there's one white zebra"
The mathematician:
"Actually, we know there exists a zebra which is white on one side"
The computer scientist:
"Oh no! A special case!"
 
Which book? It makes a helluva difference.

im reading the deitel one, i feel like its not hard but new concepts do hit u like a brick because these are stuff that i could never imagine, you know like for example learning other stuff u are like oh that makes sense (ie things like history or anything else) because it likes fits in with everything else you know about that subject or your general knowledge but with this its all new


It is more difficult to _remember_ C++ than to forget it

http://www.cliffsnotes.com/assets/25299.jpg


thats interesting but i find that after learning something totally new and only kind of understanding it, i sleep on it, and it becomes more familiar the next day


C++ is no different to any other programming language.

The most difficult for thing for me about learning to program was listening to computer scientists trying to explain simple concepts very badly.

After that was learning to structure programs so that they are easily read, developed, debugged, and extended.

The latter point is the single most important thing to learn as a programmer.

the textbook is helpful, but i feel what helps the most is the programming problems at the end of the chapters

and thank you guys you are very helpful
 
"but i find that after learning something totally new and only kind of understanding it, i sleep on it, and it becomes more familiar the next day"
Every day?
 
"but i find that after learning something totally new and only kind of understanding it, i sleep on it, and it becomes more familiar the next day"
Every day?

So far yes, but i imagine that one day i will hit something that i won't
 
Not ideal (though I have a copy myself). Deitel's books follow the same template, regardless of language. No real insight there.
I got this one when I started years ago. Worked for me.
http://www.amazon.com/Problem-Solving-C-9th-Edition/dp/0133591743/

I wasn't complaining about the book, because it does seem like i am learning but I guess you guys know more about what works and what doesn't so I'll try what andy suggested
 
"C++ is no different to any other programming language."

Well, it is.

"When I was a child, I talked like a child, I thought like a child, I reasoned like a child. When I became a man, I put the ways of childhood behind me."
 
Last edited:
im reading the deitel one, i feel like its not hard but new concepts do hit u like a brick because these are stuff that i could never imagine, you know like for example learning other stuff u are like oh that makes sense (ie things like history or anything else) because it likes fits in with everything else you know about that subject or your general knowledge but with this its all new

I'd recommend you try "Programming: Principles and Practice Using C++" by Bjarne Stroustrup instead: http://www.stroustrup.com/programming.html
IMPORTANT: get Second Edition (just published)!
It uses C++11 which is MUCH simpler and quicker for learning the basics -- especially if your aim is to get productive fast while avoiding common mistakes.

It's written to work well for people completely new to programming (which definitely includes non-CS-majors) -- as in: no prior programming prerequisites required at all.

In fact: "Ealier versions of this book have been used as the basis for first programming classes for electrical engineering, computer engineering, and computer science students at Texas A&M University for almost a decade now, and in many other places."

It's also structured in a pedagogically sound way (author has thorough understanding of C++ -- after all, he invented it ;-) -- and this shows throughout):
Bjarne Stroustrup said:
"Each topic we address serves at least two purposes: it presents a technique, concept, or principle and also a practical language or library feature. For example, we use the interface to a two-dimensional graphics system to illustrate the use of classes and inheritance. This allows us to be economical with space (and your time) and also to emphasize that programming is more than simply slinging code together to get a result as quickly as possible. The C++ standard library is a major source of such “double duty” examples — many even do triple duty. For example, we introduce the standard library vector , use it to illustrate widely useful design techniques, and show many of the programming techniques used to implement it. One of our aims is to show you how major library facilities are implemented and how they map to hardware. We insist that craftsmen must understand their tools, not just consider them “magical.”"

For more, see:
Selected quotes (with some good generally applicable advice):
Bjarne Stroustrup said:
"This book is for someone who has never programmed before but is willing to work hard to learn. It helps you understand the principles and acquire the practical skills of programming using the C++ programming language. My aim is for you to gain sufficient knowledge and experience to perform simple useful programming tasks using the best up-to-date techniques. "

Bjarne Stroustrup said:
"My fundamental assumption is that you want to write programs for the use of others, and to do so responsibly, providing a decent level of system quality; that is, I assume that you want to achieve a level of professionalism. Consequently, I chose the topics for this book to cover what is needed to get started with real-world programming, not just what is easy to teach and learn. If you need a technique to get basic work done right, I describe it, demonstrate concepts and language facilities needed to support the technique, provide exercises for it, and expect you to work on those exercises. If you just want to understand toy programs, you can get along with far less than I present. On the other hand, I won’t waste your time with material of marginal practical importance. If an idea is explained here, it’s because you’ll almost certainly need it."

Bjarne Stroustrup said:
"Programming is learned by writing programs. In this, programming is similar to other endeavors with a practical component. You cannot learn to swim, to play a musical instrument, or to drive a car just from reading a book — you must practice. Nor can you learn to program without reading and writing lots of code. This book focuses on code examples closely tied to explanatory text and diagrams. You need those to understand the ideals, concepts, and principles of programming and to master the language constructs used to express them. That’s essential, but by itself, it will not give you the practical skills of programming. For that, you need to do the exercises and get used to the tools for writing, compiling, and running programs. You need to make your own mistakes and learn to correct them. There is no substitute for writing code. Besides, that’s where the fun is!"

And, last but not least (emphasis mine):
Bjarne Stroustrup said:
"On the other hand, there is more to programming — much more — than following a few rules and reading the manual. This book is emphatically not focused on “the syntax of C++.” Understanding the fundamental ideals, principles, and techniques is the essence of a good programmer. Only well-designed code has a chance of becoming part of a correct, reliable, and maintainable system. Also, “the fundamentals” are what last: they will still be essential after today’s languages and tools have evolved or been replaced."
 
  1. "In fact: "Ealier versions of this book have been used as the basis for first programming classes for electrical engineering, computer engineering, and computer science students at Texas A&M University for almost a decade now, and in many other places."

Polter,
1. Any experience reports (btw EE has headstart ;) ).
2. Other groups, e.g. C++ for econometrician!(?) Feedback from industry.
3. Deeper insight needed with C++ 11 IMO (functional programming etc.)
4. How many production systems in C++ 11 (will take some time; I see people using Boost first). Last week I talked to someone who still used VC++ 6.0. They just moved to Windows 7 ...
5. IMO BS book is too difficult for beginners.
 
Last edited:
I have the first edition of Stroustrup. I recommend the book. If it's supposedly "too difficult for beginners," it depends on what kind of beginners they are. Stroustrup writes for intelligent people who want to be coders. I also recommend his 1994 book on the design and evolution of C++. And I've just ordered the 4th edition of his book on the C++ programming language (I already have the 3rd). He writes with insight.
 
@Daniel Duffy: note the distinction :)
- PPP: Programming -- Principles and Practice Using C++ (2nd Edition)
- TC++PL: The C++ Programming Language (4th Edition)

I think you may be talking about TC++PL in #5 (and, as @bigbadwolf notes -- rightly so, IMHO -- opinions vary).

In any case, I'm talking about PPP -- which has specifically been designed for (and successfully used with) beginners.

Asking about experience reports is in fact an excellent question!
I wish these would accompany every book recommendation, that would lead to far more concrete and evidence-based discussion.

Here's one for PPP:
"I wrote an academic paper to explain the role of the book (and the course based on it) in a more complete education: Programming in an undergraduate CS curriculum. WCCCE'09."
(PDF) http://www.stroustrup.com/software.pdf
In particular, take a look at Section 6, "The introductory programming class".

Bjarne is one of the (sadly) few programming authors who actually happens to have an in-depth practical experience in this area, backed with informative writing that also demonstrates he's given this much thought. In particular, I found these quite insightful:
- PPP Instructor's Guide (Instructor’s Guide for Programming Principles and Practice using C++)
- B. Stroustrup: What should we teach software developers? Why? CACM. January 2010
- B. Stroustrup: Learning Standard C++ as a New Language. C/C++ Users Journal. pp 43-54. May 1999

Last but not least, regarding the adoption, here's a fraction off the top of my head:
- Asio: http://think-async.com/Asio/AsioStandalone // "When using a C++11 compiler, most of Asio may now be used without a dependency on Boost header files or libraries."
- Adobe: Adobe Source Libraries have been updated to C++11 since 2013
- BitTorrent, Inc.: http://blog.bittorrent.com/2014/03/26/tech-talks-c-in-the-21st-century/
- Facebook: https://github.com/facebook // most if not all open-source C++ projects are now C++11
- Microsoft: similarly, recently released C++ open-source projects require C++11, e.g., http://casablanca.codeplex.com/
- Qt5: http://woboq.com/blog/cpp11-in-qt5.html

A relatively recent example is LLVM:
Ending out February, compiler developer Chandler Carruth at Google flipped the upstream LLVM build systems to building under C++11 by default. So far nothing has broken and in the days ahead they will carry out more tests in their approach to now using C++11 features by default as they develop this leading compiler infrastructure.

LLVM/Clang for a few releases has supported C++11 but the compiler code itself has been written in C++98. However, it was agreed upon following the most recent LLVM/Clang 3.4 release that the compiler developers themselves would be free to rely upon C++11 features.

LLVM developers for a few times have been after using C++11 functionality but now for the LLVM 3.5 release cycle they have finally agreed to allow it now that C++11 support is widespread enough upstream for supporting it as the host compiler. This C++11 usage is just not for LLVM itself but also Clang and other LLVM sub-projects where they're free to write C++11 code, albeit it's a targeted subset of C++11 for broad compatibility.
Source: "LLVM Leaps Ahead With Its Migration To C++11"

HTH! :)
 
Last edited:
As usual, Polter is a great source. It's a full-time job just to keep up :)

What would be useful IMO is a self-contained case C++ 11 from multiple domains

CAD
Process
Finance

etc.

I must say C++ 11 is in 5th gear at the moment :) You mention the somewhat bigger companies moving to C++ 11. And all the others? That's a different story, for sure.

Even since '88 90% of C++ only deal with Syntax and Widget classes is the message what I hear a lot.

// Just out of interest/comparison : I have trained ~ 5-6 thousand (mainly) industrial developers to date.
 
Last edited:
Back
Top