General C++ Programming (Page 2)

Hash table with speed required
 
Hi, everyone! I'm a C++ beginner, and here is a project which is about implementing a hash table to...
[2 replies] Last: as fast as possible means no collisions, don't even detect or handle -... (by jonnin)
How to write code for this? - Class
 
Hey all, I’m very new to c++ and trying to learn from doing exercises. I kind of stuck and need he...
[3 replies] Last: rectangle.h // #include guard: https://en.wikipedia.org/wiki/Include_... (by JLBorges)
sorting and removing duplicates from vector
 
Hi, I understand that the code below sorts the vector and remove the duplicates, but can someone tel...
[2 replies] Last: Some variants: #include <iostream> #include <vector> #include <set> #... (by lastchance)
pointer inside struct
 
Hi guys, can someone explain me the difference in meaning between struct AdjListNode { i...
[12 replies] Last: @jlb, that is why I personally NEVER declare more than one variable at... (by Furry Guy)
Size of Class/Object
 
Two queries: 1. why size of Base class object is getting 8 bytes instead of 5 bytes(1 for char + 4 ...
[3 replies] Last: A couple of links for the curious. https://www.kernel.org/doc/Document... (by salem c)
How can I make my solution more efficient?
 
I'm having trouble with a competitive programming problem, here it is. Farmer John's N cows (1 <= N ...
[11 replies] Last: So, you're saying zero holds a special value, but is that value suppos... (by Niccolo)
Assigning part of a 2d array to a new 2d array
 
I am trying to do this, but it is giving me "initializer fails to determine size of ‘b’" int ...
[7 replies] Last: @ fewdiefie You forgot that a is a 2D array, so a is the address... (by Duthomhas)
FPS game programming
 
Hello, I have spent the last 2 years learning the DirectX 11 technology to build my own FPS video ga...
[7 replies] Last: yea. I did physics sim / flight sim, just sans graphics (or on one or... (by jonnin)
Using nested if for evaluation of signum function
 
The function to be evaluated via C++ code is: Y = 0 if x = 0; Y = 1 if x > 0 Y = -1 if x<0 The val...
[14 replies] Last: but, lastchance's answer is probably the best way to actually code it ... (by jonnin)
C++
 
Hello this is my project. Because I do not know how to define which file is marked sort or unsort wh...
[4 replies] Last: C++ is a general purpose programming language and widely used now a da... (by simpliv)
Need help please.
 
OVERVIEW Object bankAccount properties: balance, acctNumber, userName Object startMenu Objec...
[4 replies] Last: Start with a thing. string userName; cin >> userName; Then severa... (by salem c)
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)
Forcing programming structure via virtual functions.
 
Hello, I'm developing an extensible software framework, and I'm at a loss about implementing some...
[11 replies] Last: I'm certainly interested, so please to drop a line now and then. (by Niccolo)
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)
Pages: 1234... 9
  Archived months: [jun2019]

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