Skip to main content
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
Results tagged with
Search options not deleted user 39848

C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. This tag should be used for any question which requires knowledge or expertise with the C++ programming language. This is a general tag which is used for any of the C++ language standards (C++98, C++11, C++17, etc.). The question should identify the compiler being used, the operating system, and which of the C++ standards is being targeted.

3 votes

Implementing C++ relational operators generator

The problem I see is that it requires that the class be derived from relational, which is not a very durable design. Instead, why not use the fact that "substitution failure is not an error" (which h …
Edward's user avatar
  • 66.6k
3 votes
Accepted

Removing duplication in horizontal and vertical checks

The most straightforward way to do this is to introduce a new boolean variable horz that is true in the case that you wish to check horizontals. With that simple addition, both routines now can be ex …
Edward's user avatar
  • 66.6k
5 votes

Adding two numbers as strings from a textfile

I have found a couple of things that could help you improve your code. In no particular order, here they are: Don't abuse using namespace std Putting using namespace std at the top of every program …
Edward's user avatar
  • 66.6k
2 votes
Accepted

Re-sorting an array of integers based on distinct digits from even to odd

I see 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. K …
Edward's user avatar
  • 66.6k
4 votes
Accepted

Efficient storage and calling of varying objects

It's hard to know where to start with this, but here are some things that may help you improve your code. When seeking a review, provide full code The posted code is just a fragment with a lot of pi …
Edward's user avatar
  • 66.6k
1 vote
Accepted

Compute interval for a node in a binary tree

It may depend on your application, but this could be somewhat simplified. If we note that there are twice as many nodes on each level, it sounds a lot like binary. Here's a table showing the node nu …
Edward's user avatar
  • 66.6k
2 votes
Accepted

Simple address book in C++

It's a good effort; the important thing is to keep practicing and keep learning. I see a number of things that may help you improve your program. Don't overspecify member functions The declaration …
Edward's user avatar
  • 66.6k
9 votes
Accepted

Printing hex dumps for diagnostics

I see some things that may help you improve your code. Use a void * for generic arguments As I'm sure you know, it's somewhat unusual in modern C++ to use a void *, but this is one of those situatio …
Edward's user avatar
  • 66.6k
2 votes
Accepted

Calculate hat, waist, and jacket size when given age, height, and weight

I see some 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. An alterna …
Edward's user avatar
  • 66.6k
2 votes

Terminal Based Game [v2]

Here are some things that may help you improve your code. Use the required #includes Within GameField.h, the code refers to Point and Player but does not include the corresponding #include files. Elim …
Edward's user avatar
  • 66.6k
5 votes

Successful implementation of Duplicate Files Finder in C++

I see a number of things that could help you improve your program. Use the required headers In a few files, we have this line #include"headers.h" That file doesn't exist, but even if it did, it's …
Edward's user avatar
  • 66.6k
6 votes
Accepted

Wiegand 26-Bit Calculator - Transforming a decimal number into an 26-Bit binary number

Here are a number of ideas that may help you improve your program. Separate calculation from I/O The Serial.println(); call from within getWeigand really shouldn't be there. It's better if the func …
Edward's user avatar
  • 66.6k
10 votes
Accepted

Work-In-Progress RPG

Here are some things that may help you improve your code. Use the appropriate #includes The code uses std::string but uses #include <cstring>. That's an error, because std::string is in <string> and …
Edward's user avatar
  • 66.6k
18 votes
Accepted

Simple equation parser and evaluator

Here are some things that may help you improve your code. Use include guards There should be an include guard in each .h file. That is, start the file with: #ifndef EXPRESSION_H #define EXPRESSION_H …
Edward's user avatar
  • 66.6k
2 votes

Compare and analyze sent and received vectors

This is just a short review to complement the nice one already posted by G. Sliepen. Use only the allowed forms of main The code currently includes this line: int main(int argc, const char **argv) Ho …
Edward's user avatar
  • 66.6k

1
2 3 4 5
33
15 30 50 per page