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

learn more… | top users | synonyms

5
votes
3answers
722 views

Handling false positives and legacy code warnings in static-analysis of C++ code? [closed]

We have a large "legacy" C++ code base on which no static analysis is run at the moment. Every now and then, we are thinking about at least using cppcheck, maybe via Visual Lint. (I've also briefly ...
4
votes
5answers
754 views

Thoughts on web development architecture through integrating C++ in the future to a web application

I'm looking to build a website (it's actually going to be a commercial startup) I saw this question and it really shed some light on a few things that I was hoping to understand (kudos to the op). ...
4
votes
2answers
1k views

C++ GUI Design & Programming

I am familiar with the basics and fundamentals of C++ and now I would like to move on to designing and coding GUI features of it, interactive dialogues, etc... like VB or Delphi Where do I start ...
3
votes
2answers
416 views

Injecting dependencies (DI) in c++ applications

I am playing with dependency injection, but i am not sure I am doing it right. Especially, I am not sure what should be the correct way to build classes with injected dependencies. Say I have a class ...
3
votes
2answers
187 views

Custom graph comparison?

I'm trying to compare two graphs using hash value ( i.e, at the time of comparison, try to avoid traversing the graph ) Is there a way to make a function such that the hash values compared can also ...
3
votes
6answers
899 views

“As” Naming Convention

I'm experimenting with a naming convention I've devised and am seeking opinion. It involves the use of an "As" infix, and at this point I am envisioning it in the context of JavaScript, C# and C++ ...
2
votes
3answers
351 views

To store data or not?

I'd like to ask you about one simple thing. I have class A that do something (for example counts something ). There is also one class B that handle some parameters to this class (class A is member of ...
2
votes
3answers
555 views

Is C++0x Compatible with C?

I have heard that there will be a lot of changes done in C++ because of the new standard (C++0x). My question is: What are the major changes, and will C++0x be compatible with C++ 98 and C ?
1
vote
3answers
393 views

C++: Metaprogramming with a compiler API rather than with C++ features

This started out as a SO question but I realized that it is quite unconventional and based on the actual description on the websites, it might be better suited to programmers.se since the question has ...
1
vote
3answers
180 views

How to make a random-access archive of text files?

I wrote an application that tests the performance of evolutionary algorithms. This application performs a run of the algorithm which consists of several generations. The data which is produced by my ...
1
vote
2answers
201 views

Initialization of objects in a system using dependency injection

This is a follow up question to the following post: Injecting dependencies (DI) in c++ applications In a system that uses DI, someone, somewhere should be responsible to create the various objects ...
1
vote
3answers
276 views

Better style for member variables?

class awesomeClass { std::list<A> myList; //... void fillList(); }; awesomeClass::awesomeClass() { fillList(); } void awesomeClass::fillList(){ //... foreach(A a, ...
1
vote
1answer
330 views

Is this an implementation of the promise pattern?

I am writing a library in C++ (making use of many C++11 features) that (as far as I can tell) implements the promise pattern. The library consists of a class that makes asynchronous network requests. ...
1
vote
1answer
903 views

How can I implement a database TableView like thing in C++?

How can I implement a TableView like thing in C++? I want to emulating a tiny relation database like thing in C++. I have data tables, and I want to transform it somehow, so I need a TableView like ...
1
vote
3answers
801 views

Pattern for Accessing MySQL connection

We have an application which is C++ trying to access MySQL database. There are several (about 5 or so) threads in the application (with Boost library for threading) and in each thread has a few ...
0
votes
1answer
867 views

Big project with many external libraries - source code organisation

I was wondering what is the best way to organize my source code. I was researching on SO and found http://stackoverflow.com/a/1398594/137261 but this source code layout is library specific and doesn't ...
0
votes
3answers
280 views

C/C++ in applications that do not concern performance [closed]

C is the best language (or maybe the single language) suitable for operating systems, drivers, embedded systems etc. For more complex domains like computer graphics C++ is a better choice. But these ...
-2
votes
4answers
652 views

Determining the winning condition for Tic-Tac-Toe [closed]

I'm writing a tic-tac-toe game in C++ and now I found a function to check if a player has a winning board for a connect four game. The function looks like this: bool haswon(int64_t board) { ...
-6
votes
2answers
15k views

How do I easily print number triangles? Using for loops [closed]

I know how for loops work and what a nested loop is but I get very frustrated while printing those number or asterisk triangles in java. It makes me wanna quit learning programming :( Please someone ...