General C++ Programming (Page 3)

A moved C++ container and MSVC++ (1,2)
#include <iostream> #include <vector> int main() { std::vector vec1 { 1, 2, 3, 4, 5 }; ...
[20 replies] Last: This is my take on ' valid but unspecified state ': valid : operatio... (by JLBorges)
fwrite(Buffer, sizeof(A), N, fp) vs fwrite(Buffer, sizeof(A) * N, 1, fp)
I have a byte array which stores a lot of struct data. When I use fwrite function, which is more ...
[7 replies] Last: If you only write as one object then you either have a successful wri... (by dhayden)
PID controller setup for each cores of the CPU
Dirty toerag "Walker154" edited with the spam.
[1 reply] : how many variables are in your state? This sounds like it could be si... (by jonnin)
by Geckoo
Hello everyone. I have a question about 3d development having made my own 2D engine without any depe...
[3 replies] Last: I don't think Vulkan will make OpenGL obsolete, or that OpenGL w... (by kigar64551)
"for (int i" vs "for (i"
Is there any reason why choose one over the other? int i; for (i=0; i<10; i++) { // instruction...
[18 replies] Last: Yeah - but in C++ a ref is just a pointer 'under the hood'... (by seeplus)
by Wallby
A predefined macro for macro recursion in c?
Hello, I read that traditionally recursive macros were possible in c but that is no longer the cas...
[12 replies] Last: Many education systems (especially in the UK) seem to teach Java as a ... (by seeplus)
by t im
About the End of Multi-level Pointer
Just as the code below: int a = 1; int *p0 = &a; int **p1 = &p0; ...... Then, where is the ...
[4 replies] Last: Thanks all the answers. I got it. (by t im)
Best Design Pattern(s) to Load Binary File
I've got an old game data file that contains binary data and would like your opinion as to which des...
[2 replies] Last: have you considered the kiss design pattern instead? Half kidding, bu... (by jonnin)
Well, to begin with you could Please learn to use code tags, they make reading and commenting...
[3 replies] Last: Ah, another "I need better code" leech shows up. They get it and then... (by George P)
by frek
MinAveRange exercise
Hi all, It's about a task on Codility saying summarily: Find the range (with at least two elements...
[16 replies] Last: When working on a solution, a couple of times I was quite close to the... (by frek)
by Cplusc
adding header and cpp files from different folder in VS project (1,2)
I had a visual studio project which was working perfectly. As far as the project contained many head...
[20 replies] Last: Thank you all for your good points. (by Cplusc)
Help with Float point refrencing Near the end of the video the guy mentions that to zoom infinitely y...
[9 replies] Last: yes. the most simple, basic thing would be to use base 10 (inefficient... (by jonnin)
Does opencv have a constexpr vector or matrix container
I would like to do something like this for example: constexpr std::array<cv::Vec3b, 6> COLORS { ...
[3 replies] Last: const std::vector<cv::Vec<unsigned char, 3> > As current, std::vector... (by seeplus)
Wandbox (Online) - How To Save?
Been using Wandbox online browser IDE just to practice and learn. Was wondering how can I save my co...
[2 replies] Last: Using an online compiler is not the best way to learn C++ since many k... (by George P)
Struct as function parameter
I have been using the following way of passing a structure to a function #include <iostream> #incl...
[4 replies] Last: // For “in” parameters, pass cheaply-copied types by value and ot... (by JLBorges)
by see17
Suppress cout output from imported library
Hello, I am importing a library in my code which is verbose in its standard output. I don't want to...
[8 replies] Last: > Is there a way to suppress the stdout from the imported library only... (by JLBorges)
difference in VTK use between v8 and v9
Dear experts, I have used VTK as library using cmake build systems. As I used VTK.8, I found ...
[no replies]
Cusom printf implementation has slight issue
Since output is worth a thousand words in this case I'll just start with how I've called the top lev...
[1 reply] : Never mind, fixed it: PAW_API pawhhu* paw_putf_int_nxt( PAWBUF *UDV,... (by awsdert)
Comparing strings
You can't use C string functions on C++ strings. With C++ strings you compare two strings using the...
[13 replies] Last: I could say I am surprised or disappointed. Well, I could, but I shan... (by George P)
by hikhok
Hello everyone!! For some reason whenever I enter the word "Rotor" on the first time it detects it ...
[7 replies] Last: if you want to do phrases, here are some test cases https://www.youtub... (by jonnin)
Pages: 1234
  Archived months: [may2022]

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