General C++ Programming - July 2019 (Page 3)

Call back functions
 
Hi guys, So I know/understand the basic premise behind call backs a function will take a function p...
[1 reply] : so basically how does this happen? is multi threading used?? obviousl... (by Niccolo)
How are operating systems written in C
 
Hi guys, A concept that baffles me and it may take a book to explain in detail but if you could sum...
[5 replies] Last: @adam2016, The history of C is informative here. It is intimately ti... (by Niccolo)
by vpi764
Histogram
 
a program to create a histogram H of 0 ≤ N ≤ 16 entries. A histogram is a set of values and the...
[3 replies] Last: @Duthomhas, Firstly, presumably the OP should show some actual work. ... (by dutch)
Oregon trail - classes
 
I have been trying to make a Oregon trail game and need some help on reading/writing files to read m...
[no replies]
Getting an error while passing an array through a function
 
I have written an algorithm for 0-1 Knapsack Algorithm. I created an array based on the function inp...
[3 replies] Last: Strictly, it's a "vector of vectors", or a "sequence of rows". To all ... (by lastchance)
Static member is accessible to class object.
 
The below mentioned code looks strange to me. template <long I> struct Fibo { static const ...
[3 replies] Last: I was under the impression that static members can't be accessed via ... (by MikeyBoy)
by MrSY
threads
 
hey i want to use threads to run 2 actions at the same time. so i tried the way i was able to see o...
[4 replies] Last: Something along these lines, perhaps: #include <iostream> #include <... (by JLBorges)
Tile collision control with SDL2 (1,2)
 
So I am building a game with SDL and in need of some help. I've built a tilemap that's a 2D array an...
[20 replies] Last: Ok so my bad, usually it's better to use sprites with the same size, b... (by Zaap)
Lamda
 
How do I make a lamda program print just the output? #include <iostream> int main() { (){std::co...
[1 reply] : #include <iostream> int main() { // anonymous lambda taking no a... (by JLBorges)
3d array
 
Here is the initialization for 3d array, i.e. n*n*5, the last dimension is 5, n could be any integer...
[6 replies] Last: Thanks all. Your replies help a lot. I am used to vector as my multi-d... (by cary333)
by Odglog
How to end a thread?
 
Hi I'm working on a text based game engine, because I have to run number of things at the same time ...
[6 replies] Last: First thing first thanks for the responds. It turned out I was stupid ... (by Odglog)
need advice
 
Hi guys, so I've been programming on and off for about 3 years now or maybe a little longer, but to...
[4 replies] Last: @Niccolo That's fascinating, you really do have a lifetime of experien... (by adam2016)
by JLP423
feet and inches to cm and meters conversion
 
Hi all, so I'm taking online C++ at my college right now, and currently I have a project of converti...
[4 replies] Last: The return type of the function is an integer type. I used long long ... (by JLBorges)
by m1smr
CMake Find<LIB>.cmake files
 
Hello, I'm currently learning CMake and something I don't fully understand is, how CMake knows w...
[2 replies] Last: How does CMake know where to find the Find<LIB>.cmake files. CMake m... (by mbozzi)
HLSL vs GLSL matrix multiplication
 
So I am converting from DirectX to OpenGL wich means I have to learn OpenGL shading language, everyt...
[3 replies] Last: It makes sense to me now thank you very much guys. by "inverted" i me... (by fewdiefie)
lost in processing .
 
Write a program in C++ that reads integer values continuously until zero or negative value is entere...
[7 replies] Last: thanks guys I will try to rewrite the code . (by Reem Alnuaimi)
vectors size is exponentially big, but why?
 
Hey guys, my vector size seems to be strangely big, the revesreVev function takes in a pointer to a...
[9 replies] Last: The std::reverse() works in-place; without additional memory. You had... (by keskiverto)
inheritance and casting
 
Hey guys, I'm following a Jamie king video on youtube (https://www.youtube.com/watch?v=TFwW36dLoHY ...
[2 replies] Last: The conditional/ternary (?:) operator is more restrictive than if-else... (by Ganado)
averaging each diagonal line in a matrix
 
Hi, I have a tridiagonal matrix and I would like to compute the average of each line of nonzero ...
[2 replies] Last: #include <iostream> #include <iomanip> #include <complex> using names... (by lastchance)
Best Undergrad C++ STL Text Books?
 
Any best technical content/quality & widely used undergraduate C++ STL Programming text books used a...
[3 replies] Last: I also have Ivor Horton's "Using C++ Standard Template Library", Apres... (by AlexCantor)
July 2019 Pages: 12345
  Archived months: [jun2019] [aug2019]

This is an archived page. To post a new message, go to the current page.