• Forum
  • General C++ Programming

General C++ Programming

by admin
Welcome to this board!
Welcome to the general programming forum in C++.com! In this forum, users can to talk about any top...
[no replies]
by piotr5
keyword "class" is inconsistent?
class c {int i,j,k;}; class c; int main(){} this simple program has no problem to get compile...
[2 replies] Last: In other words, there is no need for the class c; in your 2nd code if... (by Niccolo)
by piotr5
same name for type as for an array-variable
obviously it is possible to use same name for type and for variable-name. compiler doesn't mind. how...
[no replies]
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
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
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)
by naufal
generate hermitian positive definite matrix
Hi, I would like to generate a hermitian positive definite matrix Z based on random rayleigh fad...
[2 replies] Last: #include <iostream> #include <iomanip> #include <vector> #include <co... (by lastchance)
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)
Pages: 123... 9
  Archived months: [may2019]