General C++ Programming - June 2021 (Page 4)

std::function wont print out trapezoidal integral, lamda won't take function parameter.
 
I need help with implementing the trapezoidal method in std::function and using the lambda function....
[9 replies] Last: It's a good thing that you are keeping an eye on my bad code, Albatro... (by lastchance)
Need HELPP with my assignment
 
The structures to be implemented in the context of work are 1) Unacceptable table, 2) Classified Tab...
[4 replies] Last: Oh, and welcome to the forum. Looks like we frightened the skittish ... (by deleted account xyzzy)
Need help commenting out the code
 
Hello, so i have a task: I have a sequence which contains from 3 to 30 words, in each of which fro...
[7 replies] Last: It helps if you format the code so that it's readable and use code tag... (by seeplus)
syntax error in code, do not understand why
 
```++// Computation.cpp - This program calculates sum, difference, and product of two values. // In...
[3 replies] Last: nevermind, figured it out! thank you! completed code: ``` // Computat... (by yellowslotcar)
Remove prefix and suffix from char array
 
Hello! I am working on getting back into school after a year off. I am doing all of my assignment...
[14 replies] Last: #include <array> #include <string_view> #include <iostream> #include ... (by mbozzi)
Using std::move on std::shared_ptr<SomeClass> correctly
 
I am working on a project and dealing with shared_ptr's. The program is working and giving the corre...
[4 replies] Last: 1. Moving temp_vector into an element in temp_2d_vector will indeed no... (by helios)
rounding between C++ and java
 
I have a Dell desktop with an Intel CPU running Linux. When I write a C++ program with this line: ...
[3 replies] Last: @jonnin, you need to also use "fixed" mode to duplicate the printf out... (by dutch)
fx call prototype errors
 
Errors below. How do I call this function below separated .cpp/.h ? main { ... set_intrinsi...
[7 replies] Last: Also useful to provide: http://www.sscce.org/ (by Ganado)
by Cplusc
finite element matrix assembly in csr format using MPI
 
I am trying to assemble the global stiffness matrix in finite element in csr format. with one proces...
[2 replies] Last: @resabzr, Please learn to debug - all you have to do is print out some... (by lastchance)
I/O from cin or ifstream
 
I want to do input from std::cin, or from the file specified in argv . How do I do this in idiomat...
[10 replies] Last: Thank you everyone for your replies. They have given me much food for... (by tshemphill)
linker errors, already defined in an another object
 
so i creadted this 2d game using sdl it worked fine, but then when i started optimizing it, seperati...
[17 replies] Last: The problem with multiple definitions is with the contents of the incl... (by seeplus)
cout << endlines(x); operator overload for a function
 
Hi, i wanted to make a function which makes a spacing for a line every time I call cout. but I am s...
[8 replies] Last: I have sometimes used std::array<char, n> to return strings from funct... (by helios)
containing loop
 
when I compiling this program it gives me this error /////////////////////////////////////////////...
[9 replies] Last: @againtry thank you, my dear friend. the program works well. I will co... (by abdelrx01)
Template metaprogramming to auto-detect race conditions
 
I read a GitHub project description about using template metaprogramming to auto-detect race conditi...
[5 replies] Last: I am going to have to go over that a few times. Yeah it's pretty nea... (by mbozzi)
identifier not found
 
Hi, trying to split a function between a .cpp/.h and accessing it in main by calling that function....
[4 replies] Last: Adjusted. Thank you. main.cpp #include "pch.h" #include <iostream... (by technologist)
sdl configuration problem in vs code
 
im new to vs code, i have been using vs 2019 for so long but now I'm moving towards vscode, I know t...
[no replies]
Dice c++
 
Hello, i'm trying to make a c++ dice, i have to declare all the 10 rolls, lowest, highest and the to...
[2 replies] Last: As a starter, consider: #include <iostream> #include <cstdlib> #inc... (by seeplus)
What is the best way to learn to write pseudocode
 
What is the best way to learn to write very clear pseudo-code (using easy-to-understand statements, ...
[3 replies] Last: There's no definition of what pseudo-code involves. Some programming c... (by seeplus)
Undefined reference error.
 
In this main I have omitted the class Of quiz which Reads Quiz from the File and use it for this app...
[17 replies] Last: I'm kinda curious if it would break if you initialize a container of... (by doug4)
Output not reading correctly for pond simulator:
 
The output should look like: WEEK 20 RESULTS Fish With Weight 20 Plant weight 13.95 Plant weig...
[5 replies] Last: @GroovyJack. This is again quite a complicated exercise. Also you have... (by seeplus)
June 2021 Pages: 12345
  Archived months: [may2021] [jul2021]

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