General C++ Programming - May 2021 (Page 2)

Memory usage problem
 
the memory usage of the below program constantly increases. how to fix this problem? #include ...
[3 replies] Last: #include <iostream> #include <string> #include <algorithm> class Ch... (by seeplus)
Table of sorted numbers( entered in the command line-input)
 
Hello everyone, Im kinda lost, my task is : Number of integer​​(positive and negative) on the...
[4 replies] Last: You might use std::vector<int>. If you don't want use STL, try to writ... (by Pointee)
Opnemp code returns nothing?
 
I just started reading about openmp and was following with some sample codes, so I have the followin...
[6 replies] Last: @againtry Thanks! (by JamieAl)
Compile Errors, need help
 
I got the below compile errors. Any idea what could be wrong here? #include <iostream> ...
[6 replies] Last: Thanks everyone for quick help and suggestions. (by denver2020)
Finding a cycle path in directed graph
 
I am making a directed Graph class. I want find if there is any Cycle and update a vector with it's ...
[4 replies] Last: L9 - 10 should be: int V {}; list<int> *adj {}; The constructor ... (by seeplus)
the complexity of the algorithm
 
I don’t understand how to estimate the complexity of the algorithm below. By the most naive logic,...
[12 replies] Last: Thanks! (by onetwo123)
by derpus
ERROR: Expected primary-expression before '.' token
 
I am fairly new to C++, & I'm starting to learn threading. The official error I'm getting is: Expec...
[2 replies] Last: AH yes! Thank you so much for helping me my friend! (by derpus)
Fraction
 
I created a fraction class but seem to have run into an error. What seems to be the problem? #inc...
[6 replies] Last: If you search the forum for "fraction" and "rational" you'll find seve... (by dhayden)
Memory segments
 
Below are two codes. First, a process is created that creates a common segment and opens access to i...
[2 replies] Last: You compute an integer value and display it on the first program's sc... (by onetwo123)
by Cplusc
Matrix assembly in fem using mpi
 
following my previous question regarding using MPI for finite element http://www.cplusplus.com/forum...
[18 replies] Last: many thanks for your help. the problem was because of x and y. (by Cplusc)
by Iffahh
I am trying to create a program to calculate the price of the car. The loop user input twice. But I keep getting error.
 
#include <iostream> using namespace std; class AClass { public: int MyNum; string MyC...
[5 replies] Last: A possible OOP based solution code could be: #include <iostream> #in... (by nuderobmonkey)
by Cplusc
FEM matrix assembly using MPI
 
hello, I am trying to solve the Poisson equation using finite element method with MPI. I already ha...
[4 replies] Last: thanks for your help. (by Cplusc)
How to delete even element in an array
 
let say if my array is array ={2,3,4,5} I want to delete all the even element in the array so ...
[7 replies] Last: #include <iostream> #include <valarray> using namespace std; int mai... (by lastchance)
Reading in boolean function from a txt
 
Hi, I'm working on a project which needs to calculate the signal probability of a boolean function i...
[1 reply] : What was wrong with the answers @againtry gave you in your other (iden... (by lastchance)
by mxkxx
array parameter
 
hello! i would like to know how to get the average of the ratings with 2 decimal places. i have trie...
[2 replies] Last: It's easier to compute the average as part of the input. #include <... (by seeplus)
This is my homework actually. I am new to C++ and still am unclear what the questions want.
 
Here is the question: You must write a complete C++ program based on the instruction below: a. Write...
[4 replies] Last: Ahh, thanks for your information. (by excavator)
What happens to a unique pointer type after using std::move?
 
If do something like this: int main() { std::unique_ptr<int> mInt = std::make_unique<int>(); ...
[5 replies] Last: Note that the code would be simpler if you used auto - cuts down the t... (by seeplus)
by mxkxx
ARRAY PARAMETER
 
It must allow the user to input the values for the Midterm Rating and Final Rating based on Figure 2...
[3 replies] Last: > This must be achieved by a function call to inputRating(stud, n). R... (by salem c)
by x01337
UrlDownloadToFileA Error
 
Hi everyone! I've been trying to use the AuthGG native C++ example, and when i try to call the ...
[1 reply] : Also posted here -> https://stackoverflow.com/questions/67551618/authg... (by salem c)
Dynamic programming
 
I can't understand how to realize program with the help of dymamic programming. I understand idea(be...
[12 replies] Last: However, this is what you get if you build and then traverse your pol... (by onetwo12)
May 2021 Pages: 12345
  Archived months: [apr2021] [jun2021]

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