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.

48 votes

Mandelbrot image generator and viewer

I see some things that may help you improve your code. Move loop invariants outside the loop To maximize performance, moving loop invariants outside the loop often helps. This is an optimization th …
Edward's user avatar
  • 66.6k
41 votes

Rock Paper Scissors. My first C++ program. Please judge harshly

It's not too terrible, especially for a first program, but there are a number of things that you might improve. Decompose your program into functions Almost all of the logic here is in main in one rat …
Edward's user avatar
  • 66.6k
34 votes
Accepted

Rock, Paper, Scissors in C++

It's a good start! Here are 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 …
Edward's user avatar
  • 66.6k
33 votes

Tic Tac Toe console program

This is not bad for a programmer as new to C++ as you have said you are. Keep up the good work! With that said, here are some ideas on how you might be able to improve your program. Don't abuse usin …
Edward's user avatar
  • 66.6k
29 votes

ASCII text-based RPG game in C++

There's good news and bad news about this code. The bad news is that it's not very good code. The good news is that it's not going to be too hard to improve it greatly, and the ASCII art is awesome! …
Edward's user avatar
  • 66.6k
28 votes
Accepted

C++ Coin flip simulator and data collector

There's a lot that can be improved here, so I hope that these suggestions are useful to you. Don't abuse using namespace std Putting using namespace std at the top of every program is a bad habit th …
Edward's user avatar
  • 66.6k
27 votes
2 answers
3k views

Sudoku solver in C++

Some time ago, this question was posed, asking for help in optimizing a Sudoku solver implemented in C++. I decided to reimplement the code using C++11, but without guessing. That is, this Sudoku …
Edward's user avatar
  • 66.6k
26 votes
Accepted

Tic Tac Toe in C++14

Here are some observations and suggestions that may help you improve your program. Check your spelling If you run a spell check on your comments, you'll find a number of things such as "peice" inste …
Edward's user avatar
  • 66.6k
25 votes
Accepted

First Program Tic-Tac-Toe

Here are some things that may help you improve your code. Use the required #includes The code uses std::string which means that it should #include <string>. It was not difficult to infer, but it he …
Edward's user avatar
  • 66.6k
23 votes

C++ Shop Keeper Program

Here are some things that may help you improve your code. Make sure you have all required #includes Player.h uses std::string but doesn't #include <string>. Also, carefully consider which #includes …
Edward's user avatar
  • 66.6k
23 votes
Accepted

Fast symmetric key cryptography class

Here are a number of things you could do to improve the code. Separate interface from implementation The interface goes into a header file and the implementation (that is, everything that actually e …
Edward's user avatar
  • 66.6k
22 votes

Parallel sieve of Eratosthenes

Generally it's nice, well-structured code, but it relies on a promise that might not be kept. Specifically, simultaneous access to different elements in std::vector<bool> is not guaranteed to be th …
Edward's user avatar
  • 66.6k
22 votes

Chess engine for chess without checks in C++

Here are some things that may help you improve your code. Don't const qualify POD return values The code includes this member function within Board: const int GetPiece(int index) const; The second co …
Edward's user avatar
  • 66.6k
22 votes

Standardly deviated Fibonacci

I have found a couple of things that could 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 avoi …
Edward's user avatar
  • 66.6k
21 votes
Accepted

Text-based adventure game with too many conditional statements

I have found a couple of things that could 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 av …
Edward's user avatar
  • 66.6k

1
2 3 4 5
33
15 30 50 per page