Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++]

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

48
votes
11answers
4k 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 ...
7
votes
3answers
428 views

What are some reasonable stylistic limits on type inference?

C++0x adds pretty darn comprehensive type inference support. I'm sorely tempted to use it everywhere possible to avoid undue repetition, but I'm wondering if removing explicit type information all ...
7
votes
3answers
1k views

Microsoft Terminology: .NET C++ vs. traditional C++

I've recently been working with a team that's using both .NET C++ and pre-.NET C++. I fully understand the technical differences between the two technologies. However, I sometimes feel like I'm ...
9
votes
21answers
11k views

Should I Learn C/C++ Even If I Just Want To Do Web Programming? [duplicate]

Possible Duplicate: I don't know C. And why should I learn it? My goal is to be able to create online apps and dynamic, database driven websites. For instance, if in the future I get the ...
5
votes
5answers
3k views

Why no developer API in C++ for Google or Yahoo mail?

I was trying to do some C++ coding that can send files from my laptop to my webmail account. It took me about 10 minutes to realize that there is no easy way to do this. Look into these links: GMAIL:...
19
votes
2answers
5k 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: is ...
31
votes
4answers
23k views

JIT compiler for C, C++, and the likes

Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) ...
13
votes
10answers
2k 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, (...
161
votes
19answers
186k views

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

As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going for performance, the first and last choice is C. When "performance" isn't the main issue, programming ...
46
votes
13answers
24k 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 ...
5
votes
5answers
4k views

Ways for beginner programmer to practice with C++ [closed]

So i just finished my first semester of college. In my intro to programming class we made a bunch of super interesting (sarcasm) console applications. Any suggestions on ways other than just messing ...
0
votes
3answers
218 views

Optimizing XML based protocol

We have recently replaced binary based communication protocol with XML one (between browser based client and server). The implementation is almost complete, however I am looking for ways to improve ...
6
votes
3answers
878 views

Distributing Libraries

How are libraries typically distributed? Because they have to be compiled with the same compiler under the same settings as the project using it, distributing the .dll, .lib, etc. seems impractical. ...
4
votes
4answers
6k views

Why isn't it possible to switch between header and cpp in Visual Studio? [closed]

For the last eight years I wait for Microsoft to add the basic C++ functionality of switching back and forth between .h and .cpp files, and it keeps astonishing me it is still not supported in Visual ...
5
votes
6answers
435 views

What are your decision critera in C++ to make something a data member or virtual method?

(Figured this was too subjective for SO, so posting here...) I have some behavior that I can implement in various ways. At least two methods are shows in the code snippet below. Presume that the ...
2
votes
2answers
650 views

How to describe styles and approaches of C++ programming? [closed]

How can I say more than just "C++" on my resume, reports or other writings, to convey clearly what kind of C++ programming I've been doing? Are there well-defined styles of C++? ("Styles" might ...
28
votes
17answers
72k views

What is the best C++ interview question? [closed]

If you could ask a C++ programmer one question to measure their C++ skills, what would it be? The question I think is best is: Can you call "delete this;" inside a member function? (I put this as a ...
6
votes
7answers
610 views

Long Keywords like `function` and `namespace`

In many English-based programming languages like C++ and JavaScript, there exist long keywords like function, namespace, exception (in OCaml languages) and such. Do you think shorter keywords like ...
55
votes
3answers
22k views

What is a lambda, and why would it be useful? [closed]

So far I heard about : Lambda calculus Lambda programming Lambda expressions Lambda functions Which all seems to be related to functional programming... Apparently it will be integrated into C++1x, ...
10
votes
2answers
4k views

Most Active Open Source C# Projects?

I am looking for open source projects being done in C# that are actively looking for developers and does not mind the person coming in from a C++ background. Any pointers appreciated.
16
votes
2answers
7k views

Bitwise-OR vs Adding Flags

I've seen others use Bitwise-OR to combine flags before: #define RUN 0x01 #define JUMP 0x02 #define SHOOT 0x04 const byte madPerson = RUN | JUMP | SHOOT; That's also the way I do it. But I've also ...
45
votes
16answers
15k views

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

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 ...
5
votes
9answers
12k views

What are the hardest parts of the C++/C#/Java programming languages? [closed]

Just wondered what are the features of the three main programming languages which show you are an 'expert'? Please exclude 'practical' skills such as indenting. Am I right in saying for C++ the most ...
6
votes
2answers
572 views

Why do people confuse C-type strings and STL strings [closed]

The last week I saw at least three questions where people were confused about the differences between char * and std::string or made some related mistakes. Don't get me wrong, I don't have a problem ...
37
votes
6answers
10k views

Good example of complex code using TDD [closed]

What would be a good example of the use of TDD in large, real-life, complex, projects? All the examples I've seen so far are toy projects for the purpose of a book or a paper... Can you name an ...
2
votes
1answer
238 views

How can I move a library inside a project's source tree and compiling static binaries?

How can I move a library inside a project's source tree and compiling static binaries? I want to use a particular tool that utilizes ANCIENT binaries without upgrading it's API usage. This way I can ...
1
vote
1answer
571 views

Help me construct a list of best approaches for new C and C++ developers [closed]

Not specific code writing practices. Please also include reasoning. My start: use GCC or Clang gcc because it is unchallenged in the amount of static checking it can do (both against standards and ...
63
votes
3answers
65k views

Why is Python written in C and not in C++? [closed]

In Python's tutorial one can read that Python's original implementation is in C; On the other hand, the Python implementation, written in C, (...) I'm very curious why was Python written in C and ...
14
votes
3answers
4k 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 ...
5
votes
5answers
2k views

How do I learn linking compiling, makefile quickly? Any book recommendations? [closed]

I'm very good at programming in C++ but when it gets to linking and the other important stuffs I feel very ignorant. I want to learn allegro without wasting time. So please suggest a book or a ...
5
votes
7answers
14k views

C++ is easy once you know PHP [closed]

I was at work last week and one of our "lead developers" (who said he has programmed C++ before, but I don't believe him) was talking about C++ and how our team of developers who only know PHP would ...
11
votes
10answers
16k views

Java or C++ for university CS courses?

I'm in the throes of getting myself enrolled in school to get a CS degree. The school I am looking at actually offers both Java- and C++-based for the introductory software development courses (object-...
38
votes
5answers
115k views

What are the fundamental differences between C and C++? [closed]

Many tend to write "C/C++", as if they were the same thing. Although they share many similarities, they are clearly not the same. But what are really the fundamental differences between C and C++? Is ...
4
votes
3answers
584 views

Do you think that storing a variable length encoding in std::string or std::wstring is OK and do you do it?

I'm kind of horrified that people actually suggest using UTF-8 inside a std::string and are OK with UTF-16 std::wstring. Do you actually do this? Do you think that it is OK?
3
votes
2answers
185 views

Is there a valid reason to wrap built in type with your own

I am editing some c++ and all of the built in types have been wrapped in a corresponding wrapper class. All of the operators have been overloaded to do bizarre things like operator[] coded to ignore ...
6
votes
10answers
2k views

Languages to complement C++ [closed]

I primarily work in C++. My question is, for a C++ developer, what languages are beneficial to learn, from a job-profile point of view. For example, I see a lot of work combining C++ and Php these ...
25
votes
8answers
3k views

How did you become a const correctness convert? [closed]

After 15 years of C++, I've still haven't learn to love using const. I understand it's use, but I've never actually been in situation where being const correct would have avoided the problem I was ...
12
votes
4answers
2k views

If you favor “T *var”, do you ever write “T*”? [duplicate]

Possible Duplicate: int* i; or int *i; or int * i; Thinking about where we place our asterisks; how do those that prefer to keep the "pointerness" away from the type and with the identifier (int *...
23
votes
16answers
6k views

Is it ok if I don't know C but I am good with C++? [closed]

I have a question which I think can be best answered here. I am pretty good with C++, good as in I am comfortable with the language, I have read Accelerated C++ and done almost all the exercises. ...