General C++ Programming - November 2021 (Page 4)

May memory leak in vector<>?
 
I am confused about the memory mechanism in cpp, here is a example. { vector<A> a = {A("objec...
[2 replies] Last: You should consider logging the copy/move constructor/operators. You'... (by kbw)
by Cplusc
macros
 
Hello everyone. I am writing a finite element code and I want my code works for both 2d and 3d appli...
[7 replies] Last: Thank you all for your answers (by Cplusc)
Compiler errors in C++ code
 
Hi All Any idea what is wrong in the below code ? #include <iostream> using namespace st...
[3 replies] Last: Here main() is not allowed to access the protected member data of Som... (by doug4)
Help in Recursion
 
I'm having difficulties in understanding the logic regarding the recursion? Can someone help me expl...
[1 reply] : It actually adds the digits. In this example 0 + 0 + 5 + 2 = 7 This ... (by coder777)
How to use members of class
 
So I have a program written using structs now I want to which it over to a class contacts .duration...
[13 replies] Last: holy ***** this dude/duddete just saved me I had no idea that float co... (by UeleseA)
c++ output choice
 
I recently took c++ multiple choice test and below questions are always confusing me. Any inputs? ...
[12 replies] Last: Q3 has usable snippets. just remove the 1) type markers... removing t... (by jonnin)
Compiler optimization question
 
Can anyone help me explain why one a compiler might perform the following optimization. Assuming all...
[7 replies] Last: it varies. My complaint is most docs throw the house on you. me: I... (by jonnin)
Recursive Problem Help
 
Hello guys, I just need some help with the code below. I just need to fix it by successfully printi...
[4 replies] Last: Thanks. I appreciate that. (by ForgottenLaw)
Virtual memory paging page replacement?
 
With regard to virtual memory paging page replacement, can anyone explain to me why referenced but n...
[2 replies] Last: There's also the concept of LRU (least recently used) when deciding wh... (by seeplus)
C++ Code issue
 
Hi All I am stuck with the below C++ Compiler errors. Any suggestions? #include <iostream>...
[9 replies] Last: Add the line virtual ~XXX() = default; in the class XXX declaration.... (by lastchance)
lvalue rvalue returns.
 
Cam I write a member method called Dereference which will do both these s.Dereference() -> pri...
[3 replies] Last: Thank you... (by vidhya5)
Puzzled by Debug Assertion
 
I'm getting Debug Assertion Failed [File and line equivalent to snippet line 36] Expression: ...
[9 replies] Last: Found it. In several places i intentionally pass RACK by value, which... (by AbstractionAnon)
What would be an appropriate application for static partitioning?
 
I know that static partitioning is used for Predetermined, fixed sized, unchanging memory blocks, pr...
[1 reply] : What is your answer and reasoning? (by AbstractionAnon)
Scheduling systems: batch vs preemptive
 
I'm having trouble understanding the thorough differences between the two, but I know it is in the f...
[3 replies] Last: Perfect. (by Duthomhas)
1
 
123
[2 replies] Last: When you post code, please use code tags and sensible indentation. See... (by keskiverto)
What does this program do? Can someone kindly shed some light on this for me please.
 
#include <iostream> #include <iomanip> #include <random> #include <array> #include <ct...
[no replies]
What does this program do? Can someone kindly shed some light on this for me please.
 
#include <iostream> #include <array> using namespace std; const size_t arraySize{10};...
[no replies]
template class with .inl logic
 
How can I create and implement a template class with *.inl implementation in c++ using vs 2019? I al...
[5 replies] Last: Ok understood, thanks to clarify. (by denver2020)
Scripting language for level creation
 
I'm an OpenGL C++ programmer writing astronomy-physics simulators such as Kerbal. My website is phot...
[6 replies] Last: Lua is good but do you need it? It may be like using a flamethrower to... (by jonnin)
by jreef
Help with nan issue
 
I'm smoothing position data read in from an external source then executing a finite difference to ge...
[10 replies] Last: I suspect you're loop is running multiple times in the same millisecon... (by dhayden)
November 2021 Pages: 123456
  Archived months: [oct2021] [dec2021]

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