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

learn more… | top users | synonyms

-2
votes
1answer
806 views

Code obfuscator for C++

I suspect that obfuscating C++ code will make reverse engineering harder: without meaningful symbol names there will be no hints about modules functions and interactions. Can anyone recommend good, ...
10
votes
7answers
3k views

How to get started in opensource projects and programs [duplicate]

I am interested in starting to learn how to contribute to open source projects and Linux in general. I am a first year B.Sc. Computer Science student this year and we use c++ as our main programming ...
0
votes
3answers
3k views

How to create interest in programming? [closed]

I am student of 3rd year software engineering, and I find myself nowhere in field of programming. I know basics of programming languages like C, C++, Java, Visual Basic, HTML, JAVAScript, CSS and ...
0
votes
0answers
208 views

Which programming language is Curiosity written in? [duplicate]

Possible Duplicate: What is the Mars Curiosity Rover's software built in? I only recently came across an article that stated there was well over 500,000 lines of code in Curiosity and I ...
3
votes
4answers
653 views

strategies to keep tabs of memory leaks in non memory-managed languages

When it comes to non memory managed languages such as C, C++ or Fortran (my case), it becomes increasingly difficult to keep track of memory allocation/deallocation, especially when ownership must be ...
80
votes
11answers
20k views

What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]

A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
5
votes
10answers
595 views

I'm at a crossroads with programming and theory [closed]

I bought "Beginning C++ Through Game Programming" yesterday to start learning about C++ and programming. I'm going on hour 33, and I can't seem to put this book down. I was talking to a friend who's ...
1
vote
1answer
105 views

How to represent association in programs [closed]

Could someone help me in implementing association in cpp. I am trying to implement a dice game where I have two classes a diegame and a dice.
3
votes
3answers
660 views

Patterns for Handling Changing Property Sets in C++

I have a bunch "Property Sets" (which are simple structs containing POD members). I'd like to modify these property sets (eg: add a new member) at run time so that the definition of the property sets ...
12
votes
6answers
1k views

Homework for strong C++ developers learning Java

I'm tasked with teaching an accelerated university special topics course in Java for programmers with many years of experience in C/C++. What sort of medium-length (1-2 hours max) assignments would ...
31
votes
9answers
52k views

Comparison of IDEs for C++ and C development on Linux: KDevelop, Eclipse, NetBeans, CodeBlocks and Anjuta [closed]

I'd like to note your experience of full scale IDEs on Linux. I personally work mostly with vim, however other programmers would like to see a real IDE. So I'd like to hear your personal opinion ...
0
votes
0answers
68 views

Singletons in C++, are they really necessary, used? [duplicate]

Possible Duplicate: When is Singleton appropriate? Ok, most people probably know what a singleton is, use them, and know all the drawbacks including race conditions and so on. But what I ...
5
votes
3answers
2k views

How should I encapsulate database access?

What are some examples of good class structures used to manage database access? I am a fan of class encapsulation and would prefer the containers (e.g. car) not to perform database tasks. I would ...
21
votes
1answer
2k views

Is C++.Net used extensively?

I am a C++ coder by tradition. Over the last 12 months or so I have been doing a lot of C# coding, and have been pleasantly surprised by C#'s pragmatic approach (once I stopped trying to code it as ...
18
votes
5answers
657 views

Does unit testing lead to premature generalization (specifically in the context of C++)?

Preliminary notes I'll not go into the distinction of the different kinds of test there are, there are already a few questions on these sites regarding that. I'll take what's there and that says: ...
1
vote
2answers
662 views

How to change careers [closed]

For the past 4 years I have worked in c# doing web development. I have really enjoyed it, learnt a lot and have a worked hard to get to a position where I am earning good money and enjoy the work. ...
-1
votes
2answers
265 views

When the shell prints “TBD: create a test thread to print info from the Test object”, what does the 'TBD' stand for?

I did this after 'make' for some C++ files, and then running one of them. Does anyone know what the significance of the acronym 'TBD' is?
12
votes
3answers
3k views

Unit testing C++: What to test?

TL;DR Writing good, useful tests is hard, and has a high cost in C++. Can you experienced developers share your rationale on what and when to test? Long story I used to do test-driven development, ...
3
votes
4answers
375 views

Does it still make sense to think about effective code on micro scale in C++?

Early in my programming career I was in love with pointer twiddling, lean code, doing everything with as little layers of abstraction as possible and so on. The code was very C like I would say, close ...
6
votes
2answers
321 views

C++ Class Initalization

I'm a python programmer who sees a lot of C++ code but doesn't know the language and there seems to be two ways to initalize a class. I was hoping that someone can tell me the difference. class Point ...
14
votes
3answers
2k views

Why isn't the arrow operator in C++ just an alias of *.?

In c++, the * operator can be overloaded, such as with an iterator, but the arrow (->) (.*) operator does not work with classes that overload the * operator. I imagine that the preprocessor could ...
1
vote
2answers
594 views

Is C++ really going out of fashion? [closed]

The TIOBE index claims that the popularity of C++ is waning, and is currently way below C and Java. Echoing this claim, a blogger suggested today, that because C++ is going out of fashion, C++ ...
1
vote
2answers
562 views

Nice iterator naming [closed]

How do you name your iterators when you return a begin and an end iterator from a class? Without it sounding clunky, that is. Example: typedef std::vector<Idea> Ideas_Type; ...
1
vote
3answers
672 views

Writing cross-platforms Types, Interfaces and Classes/Methods in C++

I'm looking for the best solution to write cross-platform software, aka code that I write and that I have to interface with different libraries and platforms each time. What I consider the easiest ...
16
votes
10answers
2k views

What are the best practices regarding unsigned ints?

I use unsigned ints everywhere, and I'm not sure if I should. This can be from database primary key id columns to counters, etc. If a number should never be negative, then I will always used an ...
1
vote
3answers
386 views

Is an API in C++ a better alternative to computing directly in SQL?

I need to perform large amounts of computations on data storerd in a busy Microsoft SQL server. Would it be faster if I retrieve the data from the server, perform the computations locally in C++, and ...
3
votes
2answers
169 views

How to find an error in a tcp server application for which there is no source code

I have a c++/cli tcp client application sending a data in a specific format like L,20100930033425093,-5.929958,13.164021 to a main application on port 9000.The main application is actually done by the ...
0
votes
3answers
386 views

Starting C++ Programming (for a C# Developer) [closed]

I am a C# developer. I am planning to learn C++. (I hope I will be able to leverage the OOP concepts from C#] I have a Windows 7 machine. What are the tools that I need to install for C++ ...
5
votes
3answers
395 views

Should a standard include header be specified in each file or as a compiler parameter?

I've got a file such as this: #ifndef STDINCLUDE #define STDINCLUDE #include <memory> #include <stdexcept> #endif I want this file to be included in every header file, because I use ...
1
vote
2answers
249 views

Oracle has some very helpful and free code…I think

I found that some of the code that Oracle uses is very useful so I don't have to re-invent the wheel. Given this is at the top of the file where the code in question is: /* * Copyright (c) 1997, ...
2
votes
4answers
575 views

The benefits of using RAII in C++

Suppose I'm a teacher and I want to explain to my students what are the benefits of using RAII in C++: I need a very good example, full of details, but that is easy to understand. Which approach ...
1
vote
2answers
324 views

Can I develop OpenGL ES iPhone simple physics app with Xcode 3 in C++ without a GUI?

Can I develop OpenGL ES iPhone simple physics app with Xcode 3 in C++ without a GUI and Objective-C? So I don't need Cocoa and I don't need Objective-C?
2
votes
3answers
1k views

Can I make a good career with VC++ programming? [closed]

I'm addicted to VC++ since 2008, and I begin to work for my current company from 2011 when I graduated in Mathematics. Now I still love VC++, it is a wonderful programming language. I'm a little ...
3
votes
5answers
783 views

It's ok to study the C++ from a book that only support the 1998 version of standard?

I have this big book that basically covers all the main aspects of the C++, the problem is that is pretty old according to the C++ standards of today, it's ok to use it?
4
votes
6answers
1k views

Any good site that teaches C++?

I am searching for any good site that teaches C++, that can explain most to all things about it(general) and has a decent active community. About Me: I am new to programming(knows nothing of it, so ...
1
vote
1answer
527 views

Any good references for Learning C++ ? [closed]

I am totally novice in programming. So be very good hand in C++ from where I should start? Could Anyone suggest me some reference books and materials.
8
votes
4answers
848 views

Undefined behaviour in Java

I was reading this question on SO which discusses some common undefined behavior in C++, and I wondered: does Java also have undefined behaviour? If that is the case, then what are some common causes ...
0
votes
1answer
167 views

The design of a generic data synchronizer, or, an [object] that does [actions] with the aid of [helpers]

I'd like to create a generic data-source "synchronizer," where data-source "types" may include MySQL databases, Google Spreadsheets documents, CSV files, among others. I've been trying to figure out ...
5
votes
2answers
2k views

How do I set my environment up for TopCoder? [closed]

I tried out TopCoder today. While I liked the problem, the Java editor didn't work for me. The remote compiling time and the lack of unit tests also made it difficult to complete the task. I ended up ...
1
vote
1answer
1k views

Missed question in technical phone interview and the follow up letter [closed]

I may have just bombed a C++ technical phone interview. The interviewer asked mostly about data structures and I was able to go into detail about each of the data structures he asked about. Score one ...
2
votes
3answers
785 views

How to organize programming exercise

Due to my bad performance on past job interviews, I decided to perform daily programming exercises out of my work. Currently, I am concentrating on algorithms, design patterns, and unit testing in ...
3
votes
2answers
182 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 ...
2
votes
4answers
1k views

C++ Iterator lifetime and detecting invalidation

Based on what's considered idiomatic in C++11: should an iterator into a custom container survive the container itself being destroyed? should it be possible to detect when an iterator becomes ...
1
vote
2answers
371 views

Efficient way to compare scene-graph trees

I'm designing a scene graph system, where it is required to compare two trees. The trees are populated with individual objects, each with varied number of children; and they have a root. Eg: Parent: ...
1
vote
2answers
463 views

For nodejs what are best design practices for native modules which share dependencies?

Hypothetical situation, I have 3 node modules all native, A, B, and C.  A is a utilities module which exposes several functions to javascript through the node interface, in addition it ...
0
votes
1answer
589 views

Updating and organizing class diagrams in a growing C++ project

I am working on a C++ project that is getting bigger and bigger. I do a lot of UML so it was not really hard to explain my work to co-workers until now. Lately I implemented a lot of new features and ...
3
votes
5answers
1k views

What is the best method to start understanding BIG project source code? [duplicate]

Possible Duplicate: How do you dive into large code bases? Sometimes before developing new products we need to understand some existing products or existing source code. Sometimes to ...
2
votes
2answers
443 views

The best way to have a pointer to several methods - critique requested

I'm starting with a short introduction of what I know from the C language: a pointer is a type that stores an adress or a NULL the * operator reads the left value of the variable on its right and ...
2
votes
3answers
1k views

function works fine without return value in c++

I forgot to write return 'a'; in function and return 0; in main function but its works fine in Code::Blocks. #include <iostream> using namespace std; char show() { cout<<"this is show ...
0
votes
1answer
302 views

Implementing a “state-machine” logic for methods required by an object in C++

What I have: 1 hypothetical object/class + other classes and related methods that gives me functionality. What I want: linking this object to 0 to N methods in realtime on request when an event is ...