Questions about C++, a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

learn more… | top users | synonyms

40
votes
13answers
5k views

How to find a programming mentor? [closed]

I decided to learn programming. I've been reading SO for few days, and I think I will start with C++, as I read some articles. I am aware of loops, arrays, program logic and objects a little and I ...
83
votes
16answers
19k views

When to use C over C++, and C++ over C?

I've been introduced to Computer Science for a little over a year now, and from my experience it seems that C and C++ are both considered to be "ultrafast" languages, whereas others such as Python and ...
88
votes
22answers
41k views

Is there any reason to use C++ instead of C, Perl, Python, etc.?

As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going to performance, the first and last choice is C. When "performance" isn't the main issue, programming ...
37
votes
5answers
10k views

What is the role of C++ today?

Currently I'm an IT student and I'm wondering what is still important in C++ today, what for is it used? I completed basic C++ course in my university but I can't imagine where can I use my knowledge ...
10
votes
13answers
1k views

Is there a good book to grok C++? [closed]

This question got me thinking. I would say I am a pretty experienced C++ programmer. I use it a lot at work, I had some courses on it at the university, I can understand most C++ code I find out there ...
20
votes
22answers
4k views

Is learning how to use C (or C++) a requirement in order to be a good (excellent) programmer?

When I first started to learn how to program, real programmers could write assembly in their sleep. Any serious schooling in computer science would include a hefty bit of training and practice in ...
25
votes
24answers
4k views

Is C++ suitable as a first language?

A local college is teaching C++ to first year college students (16 years old) with no prior programming experience. As first programming language, is C++ suitable?
17
votes
3answers
4k views

How could the first C++ compiler be written in C++?

Stroustrup claims that Cfront, the first C++ compiler, was written in C++ (Stroustrup FAQ). However, how is it even possible that the first C++ compiler be written in C++? The code that makes up the ...
43
votes
16answers
4k views

Languages on a resume: Is it better to put “C/C++” or “C, C++”?

I'm graduating in a couple of weeks, and my resume (as expected) lists the languages that I've had experience with. Previously I've put "C/C++", however back then I didn't have that much experience ...
16
votes
6answers
1k views

How can I learn to write idiomatic C++?

I am a computer science student, and as a result, I was taught C++ as a better version of C with classes. I end up trying to reinvent the wheel whenever a solution to a complex problem is needed, only ...
0
votes
0answers
293 views

How to stay up to date as a programmer and developer [duplicate]

So I am going to college right now for computer science, and I am reading a lot of books on different languages that have nothing to do with my courses in school, and I found out that I am completely ...
191
votes
43answers
11k views

My Dad is impatient with the pace of my learning to program. What do I do? [closed]

So my Dad bought me 5 books on programming (C++, Java, PHP, Javascript, Android) about a month ago. He's an architect and he knows NOTHING about programming. He bought me them because I told him ...
33
votes
12answers
19k views

For what reasons should I choose C# over Java and C++?

C# seems to be popular these days. I heard that syntactically it is almost the same as Java. Java and C++ have existed for a longer time. For what reasons should I choose C# over Java and C++?
27
votes
13answers
2k views

Best way to relearn C++?

I've done Java for ten years, and stopped doing any C++ sometime in the mid-90's. What's the best way to quickly relearn C++? Near as I can figure, the language has changed significantly in 15 ...
17
votes
7answers
8k views

Can C++ be used as a server-side web development language?

I'd like to get into web development using C++ as the "scripting language" on the server-side. My server infrastructure is *nix based, so doing web development in C++ on Azure is not applicable and ...
1
vote
2answers
1k views

Fastest C++ XML parsing library

I have thousands of .xml files from size 1MB-45MB (no DTDs). I need to parse and further manipulate these XML files before generating separate .xml files with the results of my regex. What the ...
63
votes
11answers
12k views

Why do we need private variables?

Why do we need private variables in classes? Every book on programming I've read says this is a private variable, this is how you define it but stops there. The wording of these explanations always ...
44
votes
12answers
4k views

Did the developers of Java consciously abandon RAII?

As a long-time C# programmer, I have recently come to learn more about the advantages of Resource Acquisition Is Initialization (RAII). In particular, I have discovered that the C# idiom: using (var ...
6
votes
7answers
1k views

Why c++? Where to start? [closed]

I know there was many questions like this one, but please hold on one more. All programming languages I know now are made for web purposes. I've been learning ActionScript, php and a bit of ...
9
votes
7answers
816 views

In C and C++, what methods can prevent accidental use of the assignment(=) where equivalence(==) is needed?

In C and C++, it is very easy to write the following code with a serious error. char responseChar = getchar(); int confirmExit = 'y' == tolower(responseChar); if (confirmExit = 1) { exit(0); } ...
6
votes
3answers
781 views

Recommendations for C++ refresh? [closed]

As a seasoned C programmer, with some experience of C++ from way back (1990s), I've decided I'd like to get back up to speed with C++ again. Of course a lot has changed in the last 15 years or so ...
0
votes
11answers
2k views

Avoid Postfix Increment Operator

I've read that I should avoid the postfix increment operator because of performance reasons (in certain cases). But doesn't this affect code readability? In my opinion: for(int i = 0; i < 42; ...
50
votes
11answers
5k views

A modern review of Java

I've been programming for a few years and I began in Java, and in my time I've found many different sources claiming Java to be an inferior language in some way or another. I'm well aware that each ...
13
votes
7answers
3k views

What are some good open source c++ packages to study in order to learn advanced software construction?

I've heard that you should read 10 times more than you should write. This applies to both literature and source code. Therefore, I'd like to study the best c++ packages we've developed. I'm ...
28
votes
11answers
6k views

What's the benefit of object-oriented programming over procedural programming?

I'm trying to understand the difference between procedural languages like C and object-oriented languages like C++. I've never used C++, but I've been discussing with my friends on how to ...
26
votes
6answers
4k views

What does the latest “C++ Renaissance” mean?

There's recently some voice about C++ renaissance, among which the most noteworthy one is from Herb Sutter, Chairman of the C++ Standard Committee. You can search for "C++ renaissance" on Google and ...
35
votes
10answers
4k views

Are there any real-world cases for C++ without exceptions?

In When to use C over C++, and C++ over C? there is a statement wrt. to code size / C++ exceptions: Jerry answers (among other points): (...) it tends to be more difficult to produce truly tiny ...
25
votes
17answers
4k views

How can I feel more confident about my programming skills? [closed]

Programming isn't alien to me. I first starting doing markup (HTML, now please don't laugh at me) when I was 12 and a little bit of BASIC when I was 13 (I knew much about Flowcharts, Pseudocodes at ...
22
votes
8answers
5k views

Are C and/or C++ viable/practical options for web development? [duplicate]

I am proficient in C, and I am learning C++ right now. I always played with websites (HTML/CSS), and I was wondering if it would be viable/practical to create some simple web apps using C and/or C++. ...
14
votes
4answers
953 views

Enhancing the level of my C/C++ code

I have been programming for 3-4 years now and feel I can no longer be called a beginner, but I read some questions on this site and think WTF are they talking about? I feel the same way when I pick up ...
14
votes
7answers
2k views

Learning C++ properly (not C with classes) [duplicate]

The typical reason I hear to why people bash C++ is that they don't actually know C++, they just know "C with classes", which apparently is different. I am just beginning to learn C++, however, I want ...
14
votes
5answers
599 views

Is there a measure of code rot?

I'm dealing, again, with a messy C++ application, tons of classes with confusing names, objects have pointers into each other and all over, longwinded Boost and STL data types, etc. (Pause and ...
14
votes
2answers
2k views

What's RAII? Examples?

Always when the term RAII is used, people are actually talking about deconstruction instead of initialisation ... I think I have a basic understanding what it might mean but I'm not quite sure. Also: ...
8
votes
3answers
1k views

How long and what type of complexity would have been involved in Chris Sawyer writing most of rollercoaster tycoon in assembler?

From this question, I have another question about... How long and what type of complexity would have been involved in Chris Sawyer writing most of rollercoaster tycoon in assembler? In order to ...
6
votes
4answers
1k views

GO instead of C/C++ with cgo

Is it possible to replace C and C++ with Go + cgo and interface frameworks such as Qt or DirectX with Go? Any potential pitfalls I should be aware of? UPDATE: I see that my question was not precise ...
21
votes
11answers
1k views

Is pure oop necessary

Please don't direct me to this post: http://stackoverflow.com/questions/1551/how-to-think-in-oo. I have read it and still have no answer. I have programmed c++ for years and was taught that ...
14
votes
15answers
30k views

Game programming : C# or C++? [closed]

I've decided what I really want is to do game programming. So the question is, as a 18 years old who wants to learn self taught programming, what is the most suited programming language between C# and ...
10
votes
3answers
2k views

Where should I put functions that are not related to a class?

I am working on a C++ project where I have a bunch of math functions that I initially wrote to use as part of a class. As I've been writing more code, though, I've realized I need these math functions ...
8
votes
7answers
2k views

Structured programming versus OO programming

I am making a presentation that shows the differences between structural and object oriented programming and I want to illustrate why people need OOP with an example where applying OOP concepts will ...
9
votes
2answers
819 views

Monitoring C++ applications

We're implementing a new centralized monitoring solution (Zenoss). Incorporating servers, networking, and Java programs is straightforward with SNMP and JMX. The question, however, is what are the ...
8
votes
9answers
1k views

What C++ coding standard do you use? [closed]

For some time now, I've been unable to settle on a coding standard and use it concistently between projects. When starting a new project, I tend to change some things around (add a space there, remove ...
6
votes
11answers
2k views

Learning C, C++ and C# [duplicate]

I'm sure you guys are tired of this question but after wading through hours of similar posts and questions I've really not made any progress to my specific concerns. I was hoping you guys could shed ...
5
votes
3answers
383 views

Avoid having an initialization method

I have this existing code where they have a class and an initialization method in that class. It is expected that once the object of the class is created, they need to call initialize on it. Reason ...
4
votes
7answers
4k views

When is C a better choice than C++? [closed]

I can't imagine that there's any reason not to use the OOP features of C++. It's is just as fast as C, and - what's more important to me - it's transparent, just as C. (I mean "transparent" that I ...
0
votes
3answers
1k views

How to apply good Object Oriented Design principles in Embedded Systems [closed]

I am a firmware engineer moved from Electrical background to Embedded Systems. I was till now programming in C and never bothered to apply OO principles in my design. Recently I was forced to ...
14
votes
9answers
802 views

Good design: How much hackyness is acceptable? [duplicate]

Possible Duplicate: Prototyping vs. Clean Code at the early stages I'm right in front of a difficult decision. I have a problem in my codebase (it's in C++), which I could solve in two ...
7
votes
5answers
801 views

What one should look for when choosing a cross-platform C++ GUI library?

As a learning C++ programmer, I am trying to select a GUI framework or library for my own projects. I have some experience with Qt: it's very straightforward, it has a very good documentation, and ...
6
votes
5answers
457 views

Given a set of VLSI chips, how do I determine which are good?

I have the following problem: Given n chips [note: these are VLSI chips] out of which majority of chips are good, we need to find one good chip. The only test that we can apply is on a pair of ...
5
votes
8answers
885 views

Why has the rate of programming language popularization slowed down in recent decades? [closed]

If I understand correctly, there was a huge birth of programming languages during the early decades of computing, but then things have stabilized. Basically, why are many universities and industries ...
4
votes
5answers
3k views

Recommended books on C++ [duplicate]

Possible Duplicate: Is there a good book to grok C++? I'm looking for a book that contains a CDRom with a IDE for readers to install and use as a environment to learn C++ on. Like the ...

1 2 3