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 133285

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

Dijkstra - shortest Path implementation - STL

First: Why use a class? Graph graph(adjancecy_list, cost_vector); const auto result = graph.shortest_path(source_node, target_node); This could easily be refactored to a simple function call of: c …
Artyer's user avatar
  • 316
2 votes

Formatted reading

You should use a std::basic_istream<CharT>::sentry to skip the whitespace. Also, basic_istream takes a second template parameter, which you could also implement. And you might want to rethink your d …
Artyer's user avatar
  • 316
5 votes
Accepted

C++ string class implementation, providing support for various C++11 features

Errors / bugs / warnings So the first thing I did was try to compile your code. Baring in mind my command was: g++ -std=c++14 -pedantic -Wall -Wextra -Werror And then some more extra warnings. (I …
Artyer's user avatar
  • 316
8 votes
1 answer
627 views

Prime sieve for all primes up to a number

As a beginner to C++, I wanted to make something using what I was learning, so I did this to learn about arrays. This implements the Sieve of Eratosthenes to find the primes up to a limit. I didn't u …
Artyer's user avatar
  • 316