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 117626

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.

9 votes
Accepted

C++ determinant calculator - follow-up

double getDeterminant(std::vector<std::vector<double>> vect, int dimension); This will create a copy of the std::vector. For small std::vector this is not a problem, but it's good to make it a habit …
infinitezero's user avatar
3 votes

Stack array based implementation in C++

C is not C++ You are mixing C with C++ and I'm not sure why. The question is tagged c++ but malloc and free are clearly c. Unfortunately, a lot of free coding tutorials online routinely give bad advic …
infinitezero's user avatar
5 votes
1 answer
226 views

Evaluating math terms as nested lambdas instead of expression tree

I need to store some math terms. Originally I would use a tree to do it, especially if parsing strings was involved. However, since the expressions are built within the code and need not be parsed, I …
infinitezero's user avatar
4 votes
2 answers
435 views

Clebsch-Gordan Coefficients Implementation

In scientific programming I often come into the position of needing to implement a rather obscure and complicated formula. Clebsch-Gordan coefficients are such a thing. I'm mainly seeking advice on ho …
infinitezero's user avatar
2 votes
1 answer
98 views

Pseudograph Implementation

I needed a special graph structure for my code and thought I'd write a generic one for later reuse. At first I wanted to use pointers instead of indices as map keys but I quickly forfeited that idea o …
infinitezero's user avatar
6 votes
1 answer
354 views

Custom cross-platform extended ASCII converter

Problem/Background: I want to support only some special Unicode characters for my program (Greek letters and some math operators). C++ provides a char type, which is always 1 byte in size, however, th …
infinitezero's user avatar
5 votes

Stack Linked list based implementation in C++

Method Names T stackTop() and void clearStack should not contain the word stack, because they already operate on a class called Stack. Use const for methods where appropriate As pointed out in the las …
infinitezero's user avatar
3 votes
Accepted

Maximum number of words found in sentences

Time Complexity First of all, your time complexity is not O(n^2). You only have one loop going from 0 to n and then loop over each character. So your time complexity rather looks like O(n*k). I don't …
infinitezero's user avatar
3 votes
2 answers
229 views

Leetcode 14. Longest Common Prefix beats only ~50% of C++ solutions

The task is to find the longest common prefix. While I had no trouble to find the solution, I'm interested in the statistics of my code: Runtime: 7 ms, faster than 56.36% of C++ online submissions fo …
infinitezero's user avatar
2 votes
Accepted

Yet another mathematical vector class

Consistency You mix and and &&, and not and !. Choose one and stay consistent. Namespace Using a namespace is a good idea to avoid name clashes. That being said, giving the namespace a very common nam …
infinitezero's user avatar
4 votes
1 answer
198 views

Job_Queue (Thread_Pool) Program

I'm new to std::atomic, std::mutex, std::unique_lock, std::condition_variable and more or less c++11 std::thread, so I wrote this little Job_Queue class, where you can submit a void() function and it …
infinitezero's user avatar
0 votes

Matrix implementation

Since all binary operators do not modify your Matrix, they should be implemented as non-member functions. If (and only if) they need access to private members, implement them a friend. Here, this is c …
infinitezero's user avatar