General C++ Programming (Page 9)

Numerology prog help - beginner
Hey I did some c++ back in high school and I just started getting back into coding as a cure for bor...
[3 replies] Last: I made a little program to "add up" the dates by summing the digits in... (by dutch)
infinite loop not infinite
The following loop works as expected: infinite looping: bool loop = true; while (loop) { std::...
[2 replies] Last: Lol simple mistake. Brain farts happen to all of us, OP. (by TheToaster)
by Odglog
How to apply a delay to a specific part of the code?
Hello! My question is pretty simple, I am currently making a text-based top-down RPG game. Anyway, i...
[7 replies] Last: Ok, it's working now. Thanks! :D (by Odglog)
Getting an error while reversing vowels in a string
I'm writing a code to reverse vowels in a string. I first took all the vowels of a string into a vec...
[2 replies] Last: @philip92, @Repeater has the source of the crash. Now, consider what ... (by Niccolo)
Built In lower_bound function
When using the lower_bound function, why does subtracting the array give you the index value? in...
[3 replies] Last: Subtracting one pointer from another, gives you the "distance" between... (by MikeyBoy)
Array Struct Not Being Sorted
When I sort the second time based on compnow, the struct is not being sorted (line 67). #include <...
[10 replies] Last: Update: I have solved the issue, it seems all I had to do was change t... (by afatperson)
Adjaceny matrix for dijkstra shortest path algorithm
Hi guys, I want to apply dijkstra shortest path algorithm to the following 2 files: projet14_milest...
[3 replies] Last: I don't see any particular wrong in your code, and it does work in my ... (by ne555)
2D array
Hi guys, In the following code, the variable adjmatrix doesn't take the value I want it to take. 'P...
[5 replies] Last: > So 'start' should fit in char milestone_nom , isn't it? as ganado s... (by ne555)
'Function definition is not allowed here'
Hi guys, I'm trying to run the following code, but it seems there has to be a mistake in the main() ...
[2 replies] Last: It helps if you use code tags -> (by salem c)
Create file to access in program
In the program I've written, I stream data into a vector<struct> from some files up to sizes of 3GB....
[12 replies] Last: @JLBorges has a good take on this above. One thing I'd suggest, when ... (by Niccolo)
by zolo
out-of-line declaration of - template inline functions
Hi, I am getting the 'out-of-line declaration of' compiler error when trying to complie some libr...
[2 replies] Last: Hi, Thanks, changing to g++ did indeed help and the error is gone now... (by zolo)
C++ read file into adjacency matrix
Hi guys, I want to apply the shortest path method (Dijkstra algortihm) to the following file: ...
[2 replies] Last: std::string field; std::getline(std::cin, field, ','); that will read... (by ne555)
How would I solve this equation
So A is simultaneously equal to 5, 0, and 250. Where's the quadratic part? (Also, this is, y'know, ...
[no replies]
by Ganado
constexpr string_view length
Anyone know why this doesn't compile in C++17? The compiler is telling me that my that I'm calling ...
[3 replies] Last: foobar_checker< foobar().length() >() ; compiles cleanly on MinGW w... (by JLBorges)
Competitive Programming Problem
Angry Cows ========== Bessie the cow has designed what she thinks will be the next big hit video...
[4 replies] Last: > Why is the value of min incorrect you limit the radius R to the rang... (by ne555)
by GisiNA
C++ program calls template function inside DLL
Hello you all! I'm trying to pass parameters to a DLL-Funktion and get a return-value from it. My...
[3 replies] Last: Now I have a new question. Is it possible to have a template-Funktion... (by Niccolo)
Getting an error “terminate called after throwing an instance of 'std::out_of_range'”
I am doing a challenge questions from LeetCode and I came across this question. Given two non-neg...
[8 replies] Last: This got my creativity going so I tried (without looking *anything* up... (by jonnin)
by turqo
pattern search code help
Hi, could someone help me finding a way to do the following: if I have a pattern like 01001010...
[7 replies] Last: You can indeed do something like that ... but it is like scanning all ... (by lastchance)
std::vector increasing peak memory
I am failed to understand the memory taken up by vector. Problem skeleton: Consider an vector whi...
[6 replies] Last: Thanks to all for replying. I understood the limitation and the next s... (by bhargavah)
Implementation of BST using templates but error no default constructor available, help??? (1,2)
I'm using Visual Studio C++ 2017. When trying to run my codebase, I am having an error that says: ...
[22 replies] Last: My IDE/C++ compiler know where to look and it knows that this is a t... (by Niccolo)
Pages: 1... 78910
  Archived months: [jul2019]

Cannot post in this page. To post a new message, go to the first page.