Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code that is written to the 2011 version of the C++ standard, sometimes known by its pre-publication name of "C++0x". Use in conjunction with the 'c++' tag.
2
votes
Accepted
Household Outgoings Calculator (OOP)
Here are some things that may help you improve your program.
Use the required #includes
The code uses std::find_if which means that it should #include <algorithm>. It was not difficult to infer, but …
4
votes
Accepted
Trigger custom implicit conversion on "copy"
No problem with that at all, since it's not the copy which is doing the conversion (which would be strange) but the constructor. Since the vector templates you've mentioned are clearly of different t …
10
votes
Measuring execution time in C++
It seems a bit of a bother to approach it as a function template when it seems to me that it's more like an object. For that reason, here's an alternative that might be a little more natural to use:
…
3
votes
Sequentially remove members "repelled" by previous members
In all, there's not much to complain about, but I did find a few things that might be improved. All of my comments and testing are about C++11 mode, since that's what I have conveniently available.
U …
1
vote
ROM / RAM table
I see a number of things that may help you improve your code.
Improve naming
The names Row and m_table are good because they are descriptive, but num_float and num_int are not very good. It would b …
2
votes
Accepted
Priority Scheduling Algorithm Preemptive
I see a number of improvements you could make to your code.
Rethink your classes
There are a number of parallel vectors that each hold one element of a task. I'd highly recommend instead creating a …
3
votes
Accepted
Function to perform an arithmetic operation on two numbers and print the result
Here are a number of things that may help you improve your code.
Don't abuse using namespace std
Putting using namespace std at the top of every program is a bad habit that you'd do well to avoid. …
4
votes
Accepted
Manage lists of executable id
Here are some things that may help you improve your program.
Fix the bug
There is a problem with updateListExe that occurs in the test program after removing one element from the list. It accesses fr …
4
votes
Accepted
Find the total volume traded for each stock and also find the high and low for each of those...
I see a number of things that could help you improve your code.
Don't abuse using namespace std
Putting using namespace std within your program is generally a bad habit that you'd do well to avoid. …
5
votes
Accepted
Text based student information system
Here are some observations that may help you improve your code.
Don't abuse using namespace std
Putting using namespace std at the top of every program is a bad habit that you'd do well to avoid.
…
5
votes
Accepted
Finding index in list in C++
It's a short bit of code, but enough to work with, I think. Here are some suggestions to help you improve your code.
Minimize the number of comparisons
There is not really a need to check both uppe …
5
votes
Accepted
Grade Calculator (New OOP Version from one previous)
Here are some things to help you improve your program.
Don't mix I/O with data operations
Generally speaking having a std::getline and std::cout within a data class such as Class is not a good idea. …
3
votes
Accepted
Parsing command input with simple bimaps
Here are some things I saw and some suggestions for how you might improve your code.
Try not to repeat information
I don't much care for the two parallel maps because they have the same information …
18
votes
Accepted
Simple dataset class in C++
Here are some things that may help you improve your program.
Separate interface from implementation
The interface goes into a header file and the implementation (that is, everything that actually emit …
15
votes
Accepted
Multithread to print odd and even numbers
I see some things that may help you improve your program.
Don't abuse using namespace std
Putting using namespace std at the top of every program is a bad habit that you'd do well to avoid.
Elimi …