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

learn more… | top users | synonyms

6
votes
6answers
739 views

How does const storage work? (Item 2, Scott Myers Effective C++)

In Item2 on page 16, (Prefer consts, enums, and inlines to #defines), Scott says: Also, though good compilers won't set aside storage for const objects of integer types... I don't understand ...
13
votes
8answers
1k views

Is there a language between C and C++?

I really like the simple and transparent nature of C: when I write C code I feel unencumbered by "leaky abstractions" and can almost always make a shrewd guess as to the assembly I'm producing. I also ...
1
vote
1answer
518 views

Polymorphism and passing

I am writing a text based RPG, and I have three classes that inherit from a super class, they all have special attacks that they can perform, at the same time I have a class that holds the function ...
10
votes
9answers
1k views

C++ : Lack of Standardization at the Binary Level

Why ISO/ANSI didn't standardize C++ at the binary level? There are many portability issues with C++, which is only because of lack of it's standardization at the binary level. Don Box writes, ...
2
votes
1answer
297 views

Are there design patterns or generalised approaches for particle simulations?

I'm working on a project (for college) in C++. The goal is to write a program that can more or less simulate a beam of particles flying trough the LHC synchrotron. Not wanting to rush into things, ...
1
vote
3answers
403 views

CRM in the context of C++ programming

I was asked by an employer about CRM in the context of C++ software development. The position I was applying for was C++ Software Engineer. I told them: As far as I know, CRM is an acronym that ...
-1
votes
1answer
249 views

PocoCapsule project status

Does anybody know the status of this C++ Inversion of Control Container? Any alternative?
4
votes
1answer
2k views

Qt Certification Exams [closed]

I'm wondering about doing a Qt Certification Exam this year, but I'm not 100% sure the investment is worth. I'm considering it because I think it could be a nice + on my resume, and as you know, I'm ...
9
votes
2answers
1k views

How to introduce a computer illiterate 50-year old to programming [closed]

The other day my dad asked me a question that I would have never expected from him. "How can I learn C++?" My dad is turning 56 this year and computers are a distant concept for him. He doesn't know ...
16
votes
6answers
3k views

I'm a student learning C++ and I've recently found out about Ruby. Would learning (some of) Ruby help me with C++ or would it just confuse me?

As the title says, I'm a student that will be starting my second year of C++ very soon. I've discovered Ruby, however. While I've heard much buzz about the language before, I've disregarded it because ...
18
votes
8answers
727 views

Dealing with coworkers when developing, need advice [closed]

I developed our current project architecture and started developing it on my own (reaching something like, revision 40). We're developing a simple subway routing framework and my design seemed to be ...
13
votes
9answers
2k views

How to tackle massive Linux/makefile projects effectively?

I have been developing Windows applications in C++ for like 10 years now. And recently I've started digging into some Linux projects, and I can't stand how unproductive I am... I'm a fast learner, ...
2
votes
2answers
367 views

What benefits does embedding resources into the source/binary provide?

I have 300-500 images and other files that my program uses. I realize I have two options: Save them in a binary format such as BMP which is loaded dynamically. Save them in a C source file such as ...
12
votes
7answers
7k views

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

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 ...
2
votes
2answers
343 views

Is Multithreading Appropriate for Setting up Multiple Windows in the Same Application?

I am currently working with a Qt Application which tries to use multi threading to accomplish two task To Prevent the Main Thread's Event Loop from being blocked To increase computation efficiency ...
1
vote
3answers
3k 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 ...
6
votes
3answers
3k views

Abstract base classes and copy construction, rules of thumb

Often times it's a good idea to have an abstract base class to isolate the interface of the object. The problem is that copy construction, IMHO, is pretty much broken by default in C++, with copy ...
9
votes
7answers
3k views

What is beautiful code in C++, and why do most programmers care that much?

As most projects use a C++ API, they deal with constraints of the API and constraints of the project itself. I'm a beginner at programming, I don't like to use OOP at all because nobody clearly ...
1
vote
3answers
94 views

Communicating details of method result?

I have code like this (pseudocode) foreach(Box box in boxes) { if(boxFilter.PassesFilter(box)) { // do something useful } else { Log.Log(format("Box %s was rejected", ...
1
vote
1answer
400 views

what's the most efficient emacs workflow for compilation and interactive execution cycles (C++/makefile)

I try not to cross-post, but the only response I got at stack-exchange was to post here... What's the preferred practice for a compile-run cycle in emacs? Previously, I used alt-x compile (mapped to ...
1
vote
1answer
102 views

Evolutionary behavioural programming resources

A while ago I made Conway's Game of Life. I'd like to make something similar (in C++), where each cell would exhibit behaviours such as: Movement Reproduction Killing of other cells (moving onto ...
15
votes
8answers
2k views

Why is C++ still “hybrid”

On a related question, it has been clarified why C++ is not compatible with C in many aspects. However C++ is still a "hybrid"* language. And unfortunately, many programmers still consider C++ as a "C ...
2
votes
4answers
473 views

Communicating from lower level components to GUI?

What is the recommended way for a lower level software component/module to communicate with the GUI? I'm using C++. I have a service layer class that if some conditions occur needs to notify the ...
20
votes
6answers
3k views

C++ Renaissance - marketing slogan? [duplicate]

Possible Duplicate: What does the latest “C++ Renaissance” mean? Lately, I hear a lot about C++ Renaissance. What is that? C++ is currently undergoing a renaissance. This ...
5
votes
4answers
847 views

10 years out of programming, wanting to return… How to best approach it? [closed]

I've searched, but found nothing directly applicable. I have 15 years or so development experience, in Unix, C, C++ mainly, (along with assorted script / minor languages) the last 5 years of this was ...
45
votes
11answers
3k views

What can I do when the interviewer doesn't know the answer to his/her own question? [closed]

Yesterday I had a terrible experience in an interview. Interviewer asked me about pure virtual function. I said, It may or may not have definition in base class, but derived classes should provide ...
0
votes
8answers
935 views

Independent projects as a student to show off abilities [closed]

I'm an inexperienced student (having learned up to data structures and algorithms through various online resources) of computer science, and I'm hoping to get a job as a developer some time after I've ...
1
vote
1answer
295 views

C++ pigeonholing

I'm a EE major who has been working as a software engineer for the past 4 years. Nearly all of the programming that I do at work is in C++. Like a lot of other members here, I'm afraid of being ...
1
vote
1answer
428 views

Good resources for advanced C++ topics? [closed]

What are some good resources for advanced C++ topics. I know C++, but have little knowledge of threading, advanced meta-programming and inner-workings of meta-programming and I'd like to get better.
30
votes
17answers
8k 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 ...
2
votes
1answer
438 views

Minimal linux distro for compiling arm binaries

I have this setup: A windows/x86 development box and a PandaBoard ES for testing with a linux on it. I would like to ask you for recommending a linux distribution that I would run in Hyper-V on my ...
7
votes
11answers
2k views

Is Object Oriented stuff really that important? [closed]

For years, I have been doing Algorithmic stuff, writing scalable data structures for internet search, for example Randomized Binary Search Trees for Auto Recommendation, BitMaps, Wisdom of Crowd based ...
0
votes
4answers
2k views

Where to use C++ today? [duplicate]

Possible Duplicate: Is there any reason to use C++ instead of C, Perl, Python, etc.? When to use C over C++, and C++ over C? I am going to enter university next fall in computer sciences, ...
6
votes
9answers
1k views

What should a C++ developer expect on an interview at a Rails company? [closed]

I have been working on C++ backend large scale apps for over 5 years. I'm doing TDD, using STL and Boost etc. I decided I need a change and about year ago started learning Ruby, and few months ago I ...
1
vote
4answers
2k views

How do I refer to the smallest possible non-zero value?

Back in my C programming days I thought there was a constant or function (I can't remember what it was called, let's call it SMALL) whose value was the smallest possible positive value. (Imagine the ...
21
votes
11answers
6k views

typedefs and #defines

We all have definitely used typedefs and #defines one time or the other. Today while working with them, I started pondering on a thing. Consider the below 2 situations to use int data type with ...
8
votes
5answers
2k views

Is having C++ header files without extension a good practice?

I have an argument with a collegue of mine regarding the C++ guidelines to follow. He currently designs all his libraries that way: He uses inconsistently uppercase and lowercase letters in his ...
9
votes
5answers
3k views

Interface and Inheritance: Best of both worlds?

I 'discovered' interfaces and I started to love them. The beauty of an interface is that it is a contract, and any object that fulfills that contract can be used wherever that interface is required. ...
6
votes
2answers
1k views

Best approach to selecting programming languages and 3D graphics API for simulating physics experiments

I am starting a research project and need to nail down a programming language and 3D graphics API where I will be creating an environment in the field of molecular cell biology where I will be ...
3
votes
1answer
604 views

Using the decorator pattern in a deep class hierarchy

How would one use the Decorator design pattern for anything other than trivial toy problems, in a deep class hierarchy? For example, let's say you have the class class Decorated : public Foo, Bar, ...
25
votes
7answers
5k views

Are utility classes with nothing but static members an anti-pattern in C++?

The question Where should I put functions that are not related to a class has sparked some debate over whether it makes sense in C++ to combine utility functions in a class or just have them exist as ...
12
votes
5answers
9k views

Is it possible to use C++ with the .NET framework?

I've read many comments about GUI programming, in both, C# and C++. And I noticed that Microsoft's .NET framework is powerful for GUI programming. So is it possible to use C++ and .NET framework? I ...
3
votes
3answers
621 views

Is an 8 second (incremental) build time common?

My current project takes 8 seconds to build one C++ file. Is this common? Other files take 12-15 seconds but most at the moment are about 8 seconds. I use Visual Studio to tell me the time. I have ...
1
vote
3answers
725 views

How do large-scale applications handle GUI creation?

I'm interested in developing GUI-based Windows applications in C++, but I'm not sure how it's done in professional or large-scale settings. It seems it would take a lot of development time to describe ...
-1
votes
1answer
617 views

How to design classes in right way (sending messages)

Trying to design small project in right way and have a trouble in it:\ about task: need to realize multiplication of big numbers, using fft First, i have classes class LargeNumber{}; class Field{}; ...
19
votes
3answers
8k 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 ...
6
votes
2answers
929 views

What data structure could I use for modeling a network of nodes and edges?

My application needs to model of and perform operations on a network with 40 - 50 nodes and typically less than 6 edges per node. Both nodes and edges are objects with around 1K data each. During ...
0
votes
3answers
373 views

Do you have a find/replace list of C/C++ code improvements that doesn't cause side effects?

Time after time you have to work with code that's not as safe as you would like it to be. Either that's someone elses code, or something you wrote at 3am 5 years ago, but it happens. And in those ...
2
votes
2answers
346 views

libavcodec/libavformat question

I've seen this code referenced in two different places, yet I haven't seen anybody bring this up, but it seems that on line 00339 there is an empty if block and I just copied the code to compile try ...
0
votes
1answer
188 views

Lua-type Java integration with C++

So I'm curious: I've implemented Lua within C++ a few times before, and while it was relatively simple, it still didn't harness the power that I would have liked. I love how eclipse works, ...