General C++ Programming - December 2021 (Page 3)

Writting in a saved File.
Open the file in append mode. Run this program a few times and observe its output: #include <iostream> #include <fstream> #include <string> int main() { ...
Dec 7, 2021 at 6:33am
[no replies]
Assigning local lambda makes for dangling reference?
Hi, I have a local lambda that is assigned to a field of an object called storage. This lambda will be called from elsewhere and my concern is whether this lam...
Dec 7, 2021 at 4:00am
[7 replies] Last: > How do I know it is moved assigned? The standard specifies that st... (by JLBorges)
Conceptual: Assigning threads to different CPU cores , Mutexes vs Semaphores
Hello, I am trying to figure out some things relating to a learning exercise in Operating Systems. We must explain, conceptually the following. 1. What is th...
Dec 6, 2021 at 10:14pm
[2 replies] Last: 1. What is the disadvantage of always assigning a thread to a differe... (by kigar64551)
recursive (1,2)
could someone explain how to do the recursive portion on this #include <iostream> #include <iomanip> #include <algorithm> // for min, max using namespace...
Dec 6, 2021 at 10:09am
[34 replies] Last: From JLBorges post above: int mul( int a, int b ) { if ( b == ... (by seeplus)
using classes for calendar helper (1,2)
looking for help on this code I have no idea how to continue from this point #include <iostream> #include <iomanip> #include <string> using namespace std; tem...
Dec 5, 2021 at 7:55pm
[22 replies] Last: I've tried to make my code less confusing I have Set Day done..( case... (by ocKiNOsIi)
Elaborated type specifier syntax
I need a simple "Elaborated type specifier syntax" example and when to use it?
Dec 4, 2021 at 10:50pm
[no replies]
memory mapping
i am trying to map an exe file in memory than write to its text section and than write it back to disk. while debugging it shows data successfully written in th...
Dec 4, 2021 at 1:54pm
[9 replies] Last: thought mapping a PE will sort of emulate how a PE looks in memory ... (by kigar64551)
by Cplusc
Metis for finite element triangular mesh partitioning
I am trying to use Metis to partition a finite element mesh. however, In the metis manual I read something that made me feel confused a little. "All of the me...
Dec 4, 2021 at 1:45pm
[6 replies] Last: When I obtain eptr and eind according to what we have discussed here s... (by Cplusc)
by pika77
howw to pass user value using same variable between function to function
/* Given the following C++ program, #include<iostream> using namespace std; int main() { int n1,n2,sum; cout<<"Pls enter 2 number: "; cin>>n1>>n2; s...
Dec 4, 2021 at 11:35am
[2 replies] Last: thks bro!! my code finally works XDD (by pika77)
by volang
I need a corresponding solution in C++ for an OpenSSL command
In tls.ulfheim.net , there is a section called "Server Encryption Keys Calculation". If you open it, then click on "Show code" (the second one), you'll see what...
Dec 4, 2021 at 7:03am
[4 replies] Last: Thank you kigar, this helped alot. Finally I got it to work with the h... (by volang)
by Cplusc
array of pointer
In the following piece of code, I have a problem of reading memory. When assigning value to adjncy It says "unable to read the memory". I can pass the adjncy va...
Dec 3, 2021 at 10:36pm
[4 replies] Last: Thanks for you explanation. I got it. (by Cplusc)
ь
and the c++ question is? There is the c++ std::sort() which can be used with an appropriate comparator. http://www.cplusplus.com/reference/algorithm/sort/
Dec 2, 2021 at 11:35am
[1 reply] : #include <iostream> #include <vector> #include <utility> #include <al... (by lastchance)
Understanding pointer to a vector of pointers code
(I didn't write this code. This is an existing piece of code from UC Berkeley's parallel algorithms homework which I should parallelize using Pthreads) There i...
Dec 1, 2021 at 1:14pm
[2 replies] Last: or, you misread it. new works like this: pointer = new type; //one it... (by jonnin)
cannot display output
in this code, I need to write and always update the file, I had done this part, but I try to display the output, it only displays the first data. and when I do ...
Dec 1, 2021 at 7:37am
[2 replies] Last: will work on it! thank you! (by saltyyyyy)
by volang
Namespace conflict
I have "using namespace std" in my project. At the same time I'm using bind() from winsock which is global. I know there is a function called "bind" in the std...
Dec 1, 2021 at 1:31am
[1 reply] : https://stackoverflow.com/a/15260456 note that the template argument i... (by ne555)
"No matching function for call" error in linked list
I'm adding a copy constructor and overloaded assignment operator to a linked list header file and implementation file, but I am getting notes and errors from th...
Dec 1, 2021 at 1:01am
[2 replies] Last: the compiler can't read your mind. you haven't defined a constructor f... (by ne555)
December 2021 Pages: 123
  Archived months: [nov2021] [jan2022]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.