General C++ Programming - January 2022 (Page 3)

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 deleted account xyzzy)
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)
by frek
A class and two operator overloading (1,2)
 
The exercise says: store several (name,age) pairs in a class. Doing the reading and writing using y...
[21 replies] Last: > The exercise says: store several (name,age) pairs in a class. > D... (by JLBorges)
Is there a simple way to improve this for lists?
 
Basic template version of finding max number of consecutive values in collection. But I believe for...
[1 reply] : Note that bind2nd() was deprecated in C++11 and removed in c++17. I su... (by seeplus)
Unable to find error in Sorting & Searching codes
 
Hi, this is my first time coding a searching and sorting program so I have a hard time finding what ...
[4 replies] Last: I suspect the assignment is to create a sorted list and search it. Hen... (by Duthomhas)
Database query for search
 
Hi all, I've got a query please that any comments would be greatly appreciated. I have a prog...
[7 replies] Last: thanks so much again jonnin, really appreciated your help x (by ikindalikestevejobs)
by frek
C++ pointers
 
Hi all, Running this code: #include <iostream> int main() { int* pn1 = new int{ 5 }; int* pn2...
[16 replies] Last: This may (if reallocation is required) invalidate pointers to previous... (by jonnin)
Function Help Problem
 
Hi guys, can someone lend me a hand in the problem below? I'm having difficulties in making the prog...
[12 replies] Last: Just remember that 'throwing' is 'expensive' in terms of performance..... (by seeplus)
Array Comprehension Problem
 
Hello. I'm currently studying array right now and I have a question regarding the code below. How do...
[3 replies] Last: Try changing to in L13 and see what is then displayed. Then relate... (by seeplus)
I have some spare time, What C++ library should I write?
 
I am looking to start working on an Open-Source C++ side project and am in need of good ideas. I ...
[1 reply] : What about a library for creating ebooks - .epub or .mobi. (by thmm)
string_view as a value vs as an rvalue?
 
So I have a templated function, SetMessage(), that takes a string_view as one of its arguments: t...
[1 reply] : Not a few minutes more of searching did i find my answer... https://st... (by USAFrenzy)
January 2022 Pages: 1234
  Archived months: [dec2021] [feb2022]

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