General C++ Programming - June 2022 (Page 2)

by kbw
What is an undefined reference/unresolved external symbol error and how do I fix it?
 
It depends on where you see it, during compile or link. It means you've used something without decl...
[1 reply] : Usually the error also says where the bad reference comes from. Read ... (by dhayden)
Why Have Functions() in classes? (1,2)
 
Why Have Functions() in classes? As a C only programmer trying to learn C++ I don't understand why f...
[35 replies] Last: That only covers C++11. Better C++11 than either C++98/03 or no stan... (by deleted account xyzzy)
Ranges overkill?
 
The latest article from Rainer Grimm ( http://www.modernescpp.com/index.php/ranges-improvements-with...
[5 replies] Last: Here's a talk about std::ranges that shows better use cases. https://w... (by thmm)
by n00b1e
UnorderedMap
 
How would you implement bidirectional iterators for generic UnorederedMap class with: ++, --, < an...
[6 replies] Last: yeah I meant == and != not < sry (by n00b1e)
Matrix Division in Eigen vs MATLAB
 
I am trying to find the equivalent of the opertaor in MATLAB: A = B/C where here A,B, and C are ...
[5 replies] Last: @mbozzi Thanks! This is pretty helpful actually. (by JamieAl)
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
OpenGL
 
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)
help
 
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 deleted account xyzzy)
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
 
https://youtu.be/KnCNfBb2ODQ 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 deleted account xyzzy)
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)
June 2022 Pages: 123
  Archived months: [may2022] [jul2022]

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