General C++ Programming - April 2021 (Page 6)

getpid() linux
 
I need to get pid for every processes. In process I get sum of every arrays. In the I get max sum. I...
[4 replies] Last: The printed pid's look good. What did you want to know? I start to ... (by onetwo123)
C++ Question
 
hi I am supposed to add code and I tried and for some reason the program isnt running!I feel Like I ...
[1 reply] : Look at line 9, your function declaration of unmix. You are telling t... (by deleted account xyzzy)
Array question
 
(Question) Write a C++ program that includes the following: Declare an integer array of size 10 ...
[9 replies] Last: oh wow thank you sire , kinda fiqured I was messing up in the int part... (by Sunnycoder)
by cmisip
How to optimize this code for Encode float to int and Decode int to Float
 
I am trying to build an algorithm for compressing 4 byte floats into a custom 2 byte uint16_t. I pl...
[4 replies] Last: A lot of data needs to be sent through the I2c bus which is why I chos... (by cmisip)
by frek
Merge file using std::merge
 
Hi all, The exercise says we need to merge two text files into a third one suing std::merge . Sinc...
[5 replies] Last: Texts like these" Banana Trees 80 Pounds 123 Jack Sparrow Jungle sur... (by frek)
im having hard time with this assignment? can someone let me know plz
 
Use Weekas1.txt file and load an 8 by 8 integer array. Create the following functions: This func...
[17 replies] Last: Without using the stl: #include <iostream> #include <fstream> cons... (by seeplus)
by MdP
placement new, in an exported template in a module
 
Hi, I'm converting an existing codebase to use C++20 modules, using Visual Studio 2019. Let's sa...
[no replies]
How can i call a derived class method using a base class object ?
 
I understand how this goes in the opposite direction. But for various reasons i want to use a base c...
[1 reply] : First, you should avoid using variable names like 'x' and 'y' (outside... (by Ganado)
I have a problem with this code i don't able to update my dates in admission and date of birth
 
#include <iostream> using namespace std; class date { private: int day{1}; int month{1}; ...
[5 replies] Last: It is also nice if you include proper formatting as well. Just copy a... (by JRManx)
by VoB
Not all lvalues can be on the l.h.s. of an assignment
 
Hi everyone, I'm trying to go a understand a bit deeper the concept of lvalue, xvalue,glvalue,rvalu...
[4 replies] Last: Thanks @helios Indeed that if clause would lead to some troubles... f... (by VoB)
Have some issues with my code. It return a strange address instead of class parameters values. Can anyone help me , please ?
 
Hey there ! I have an issue with my code , something about my virtual function and input/output ope...
[3 replies] Last: friend istream &operator>>(istream &input, C &o3) { ... (by dhayden)
by yin
Program won't go inside of if statement
 
I tried debugging as well and outputted both the coin face and the toss selection, right before the ...
[1 reply] : srand() should only be used once at the beginning of main() For the t... (by seeplus)
by RicoJ
std::packaged_task constructor
 
It seems that there's a difference between () and = constructor (ctor) here. #include <functional...
[1 reply] : Line 7 performs copy-initialization while line 8 performs direct-initi... (by mbozzi)
by RicoJ
Ambiguous Function Call?
 
My understanding for function call sequence is: exact matching function > template function. Howev...
[10 replies] Last: Hi guys, Y'all have raised some very nice points! Yes, I did have #... (by RicoJ)
Can I Write iOS/Android Apps with C++?
 
I've finished a library of functions for calculating sunblock data, in C++. Is it possible to use my...
[3 replies] Last: Yes, although since running apps from the command line is not for ever... (by JRManx)
Pixel Art
 
So, quick Q. How would I use Pixel Art in Visual Studio 2019? I would just want to do a few Animatio...
[4 replies] Last: Panda, your question is fine here, it's just that the answer is a lot ... (by Ganado)
How can i clean my messy cod
 
Hi everyone. Im a newbie, because of that i apolige. I have a messy code. I want to clean it and wan...
[19 replies] Last: Messy cod tartare with Mongolian tartar sauce made from tooth plaque. ... (by JRManx)
Find word in a string array
 
So i have made a program that reads a file and stores the content in a wstring variable (Needs to be...
[5 replies] Last: Is this what you're after: #include <iostream> #include <fstream> #... (by seeplus)
copy constructor is deprecated if copy assignment operator or the destructor is user-declared ????
 
I do not understand how a copy ctor can be deprecated when either of the special functions mentioned...
[1 reply] : Currently the C++ compiler will write a copy constructor and copy ass... (by mbozzi)
Why Cant i used non-static variables for default argument assiment
 
struct X{ int var; void do_stuff(int i = var){...}//compilers want me to make var static }; ...
[7 replies] Last: @mbozzi oh man you are right Thanks!! (by Kallinteris Andreas)
April 2021 Pages: 1... 45678
  Archived months: [mar2021] [may2021]

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