• 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 frek
General rule on inheritance
 
Will you please explain this general rule: “a D is a B” does not imply “a Container<D> is a C...
[10 replies] Last: Therefore, generally we can say that two classes, bus and vehicle, are... (by frek)
temporary objects get destroyed and corrupt program
 
I believe the following code has a bug related to temporary objects getting destroyed leaving dangli...
[4 replies] Last: That's it!! Not quite. Having references as member variables are alwa... (by coder777)
iterating over a static std::vector
 
So I have a static std::vector like this: static std::vector<ApiWrapper> api_handlers = { Rtl:...
[8 replies] Last: Could be SIOF https://en.cppreference.com/w/cpp/language/siof (by mbozzi)
Assignment operator bottlenecking simulation
 
I am running a Monte Carlo simulation of a polymer. The entire configuration of the current state of...
[15 replies] Last: maybe instead of G = std::move(G_), the easiest thing to do might be ... (by seeplus)
by frek
Change C code to C++ in an embedded project
 
The following C code is in the main.c file of an embedded project on STM32CubeIDE. /* USER COD...
[9 replies] Last: Thank you very much salem c . Your remark is right and worked. First... (by frek)
For Loops in an Array Comprehension Help
 
Hi guys, I encountered this problem while I was tackling loops in an array. Can someone help me by e...
[1 reply] : So without the 2nd a++ at line 21, you do understand why you see 1 ... (by salem c)
GDIPLUS: using Graphics, can i get HDC?
 
using Graphics, can i get HDC?
[13 replies] Last: heres the result: https://imgur.com/IXtmQPB (by Cambalinho)
by frek
C++ threads
 
Why is the operator's message printed and then the function's while they've been defined and join e...
[12 replies] Last: Pass the object by value. void f( std::vector<double> v ) { // the f... (by JLBorges)
bug code
 
Below code gives some bugs some inputs which seems to be incorrect, which I am trying to figure out,...
[8 replies] Last: Thanks a lot lastchance, I am studying your code, it helps a lot. (by leo2008)
by Cplusc
Visual studio freezing all the time
 
Hello everyone. I've got a problem with visual studio for several days and I have tried many many th...
[4 replies] Last: @jonnin thanks for the answer, I tried the latest version as well, but... (by Cplusc)
Could someone help me with an assigment?
 
Hello! I'm a new female coder and I have started getting Computer science assignments but do not ful...
[8 replies] Last: > Doesn't modern C++ have an (optional) "Thou shalt not ignore the val... (by JLBorges)
by see17
Communicating serialized objects over network
 
Hi, I am a student working with this library https://github.com/microsoft/SealPIR/blob/master/main.c...
[16 replies] Last: Makes sense, thank you all for clarifying! One more question: I also ... (by see17)
Standard filesystem time types
 
Hi all, https://en.cppreference.com/w/cpp/filesystem/file_time_type #include <iostream> #include ...
[1 reply] : For C++17 you need to supply a TrivialClock * for the time point inst... (by George P)
Declaring a probability distribution within a class
 
I would like to declare a probability distribution within a class. Why does the desired form (2) in ...
[2 replies] Last: Thank-you, @coder777 (by lastchance)
by frek
C++ text file writing and reading
 
Exercise says: Write integer numbers into a text file and then read from them. I wrote the code b...
[18 replies] Last: > What makes you define the class inside main()? > Classes/structs are... (by JLBorges)
C++ LL issue
 
The length of list is total num of nodes it contains. So am empty list has length 0. For example con...
[8 replies] Last: Then possibly just simply: #include <iostream> struct IntListNode ... (by seeplus)
implicit conversion from void to T and T to void?
 
Hi, Looking at the code for Loki (Andrei Alexandrescu) there appear to be code that says that the...
[1 reply] : You need to see this in context. Loki was full of mind/compiler bendin... (by kbw)
GDIPLUS: can i draw an image using corners?
 
the Gdiplus::Graphics::DrawImage() have a way for draw using coners? or the rotation points?
[7 replies] Last: sorry... not rounded... just normal corners. but adding the 4 points, ... (by Cambalinho)
coin smallest
 
I am trying to find the amount here. Input The first line of input contains an integer M, the numb...
[4 replies] Last: ah. Much better explained! if the coins were standard USA$ types, th... (by jonnin)
Pages: 123... 5
  Archived months: [nov2021]