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 93301

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.

4 votes
Accepted

Measuring executing time

Usage: Famous Scott Meyers' words: "Make interfaces easy to use correctly and hard to use incorrectly". It should be kept in mind. It is really cumbersome to use. Users have to create different scop …
Incomputable's user avatar
  • 9,504
5 votes

Sigma calculator

Architecture overview Well, it started good, but turned bad. Very bad. First of all, lets kick off from important things Debunking myths I am not able to pass just a list of terms to the constr …
Incomputable's user avatar
  • 9,504
1 vote

Form linked list from inputted string and modify it by criteria first character of first wor...

This might be a good attempt for a beginner. I stopped reading after main(). There are just too many things that are wrong, for C++ programmer. I feel strong influence of higher level languages, but C …
Incomputable's user avatar
  • 9,504
1 vote

Reading a yes/no answer from std::cin

Overengineering Well, as you've mentioned in the comments, my solution is a bit of overengineering. Class I'd write a bianry_response class. class binary_response { static std::unordered_set …
Incomputable's user avatar
  • 9,504
1 vote
2 answers
197 views

Object Oriented Graph Hierarchy with Depth First Search

I would like to receive review on my code. It has only depth first search (DFS) and bidirected graph is the only member of the hierarchy. I added name member for the BiGraph to make it easier to debu …
Incomputable's user avatar
  • 9,504
2 votes
1 answer
82 views

Object Oriented Graph Hierarchy with Depth First Search revisited

This question is follow up to Object Oriented Graph Hierarchy with Depth First Search. I tried to fulfill every point which @LokiAstari mentioned. I think I succeeded in everything except Visitor Patt …
Incomputable's user avatar
  • 9,504
2 votes
Accepted

A reader and its associated writer for disjoint value access

Easy of use: You could make implicit conversion to bool for writer<> class, so it would be less cumbersome to use it. On the other hand, those who are not familiar with the internals might be surpris …
Incomputable's user avatar
  • 9,504
0 votes

Split a String On A Word By Words

I would extend this even further to have iterator support and other std::basic_string instantiations. The extension might not be worth it if the project is small and unlikely to change. template <typ …
Incomputable's user avatar
  • 9,504
2 votes

First stage of a complex calculator implementation in C++

Design Since the name has complex in it, I'd always think about extensibility and flexibility. I think this design is very fragile. I'd write something like infix to postfix notation converter and e …
Incomputable's user avatar
  • 9,504
4 votes

C++ Circular buffer through Circular iterator

High level overview: The idea is solid, but creating an iterator adapter to make the container behave differently just sounds weird. It would be better to have container adapters, as std::stack<> and …
Incomputable's user avatar
  • 9,504
10 votes
3 answers
6k views

Typelist with extractor

The purpose of the code is to store arbitrary number of types. The type can be extracted from it using Extract template, which uses template recursion to get the needed type. There will be compilation …
Incomputable's user avatar
  • 9,504
6 votes
Accepted

Write Julia struct to a C++ struct

Precision float is usually a 32-bit floating point type. Perhaps you meant double? With C++23, you can use std::float64_t. Aggregates There is aggregate initialization that removes the need for create …
Incomputable's user avatar
  • 9,504
4 votes

Multithreaded natural language text parser (Rev.3)

To me this looks like a classic map-reduce problem. I would implement a map and reduce functions, of which mapping of chunks looks like Setup thread local datastructures (no thread safety needed, bec …
Incomputable's user avatar
  • 9,504
3 votes

Convenience function wrapping C++17's std::sample for distance=1 case

Interface First of all, I would consider usage cases. If there is significant need for sampling from one-pass-only sequences (streaming from a file or network), then I would keep current interface of …
Incomputable's user avatar
  • 9,504
6 votes

Converting between miles, meters, inches, yards and feet

I like what @Rakete1111 said, nevertheless, I would like to present entirely different approach. Standard library: There is time conversion functions and time units available in the standard librar …
Incomputable's user avatar
  • 9,504

1
2 3 4 5
13
15 30 50 per page