General C++ Programming - July 2021 (Page 5)

by Cplusc
switch in c++
 
I have a class which takes three arguments, number of row, column and value. I need to modify the va...
[6 replies] Last: Thanks (by Cplusc)
by Annaer
Pseudocode implementation of forward search algorithm
 
Can anyone help me solve the problem of how to implement this pseudocode in C or C ++?I thought abou...
[2 replies] Last: This is a very general expression of the algorithm. Can you give some ... (by dhayden)
XOR Paths
 
You are given the following: A tree T consisting of n nodes An integer x Each node has some value...
[3 replies] Last: @cool123dude, Show your input format and your attempt. You can do it ... (by lastchance)
referncing an int using boost
 
im introducing boost in my code and would like to make the datapushback that occurs on line 110 to p...
[7 replies] Last: You haven't shown the error message, so can't tell you. (by AbstractionAnon)
Reading Binary Files
 
I have this code but it's failing one test with using option 3 to read both files because it's only ...
[2 replies] Last: Can you provide the input file? Use C++ strings and vectors instead o... (by dhayden)
Read file by column
 
Hello, I just learned c++. I have a data with 4 rows and 3 column 2019 2 15 2018 3 23 2017 4 0...
[7 replies] Last: Yes - assuming that smallest is set to some initial high value that wo... (by seeplus)
excpetion unhandled using boost
 
i dont know what is going wrong and I am beginning to panic. trying to learn serialization with boo...
[9 replies] Last: im not sure what ive done but its fixed (by JackLadYT)
by Cplusc
c++ class
 
I define a class for generating matrix and there is no bug there but when in main program I want to ...
[4 replies] Last: L10 Pass matrix by const ref and not by value. This is currently doing... (by seeplus)
enable_shared_from_this initializes an empty weak ptr so how does it work its magic?
 
enable_shared_from_this creates a shared_ptr from an empty weak ptr. This makes no sense to me - I w...
[6 replies] Last: Thank you so much!! Both @mbozzi and @JLBorges!! It is clear now (by JUANDENT)
help with Vector class question
 
Please help me answer this question. Given the following class declaration of a Vector class, whi...
[3 replies] Last: Perhaps: #include <initializer_list> #include <algorithm> #include ... (by seeplus)
by Cplusc
default constructor does not exist in the class
 
anybody can help with this piece of code; I am using class to build matrices nut when I define my o...
[12 replies] Last: Admittedly the const version is a bit silly without a way to initializ... (by Ganado)
by eri0o
for(int i; i<length; i++) performance
 
Hi, I have been looking some codebases that use SIMD intrinsics and other technics to get better ...
[7 replies] Last: It's been shown in articles by cppstories that simply replacing std::a... (by seeplus)
by Cplusc
Class in c++
 
hello everyone, I am working on finite element and I have two text files which one of them is the el...
[12 replies] Last: Thanks (by Cplusc)
How is this inheritance used and produced
 
//Band.CPP #include "Band.hpp" Band::Band(int members, int foundingYear):members(members), foun...
[1 reply] : I believe you've already been asked to use code tags around your code.... (by kbw)
Why does emplacement allow you to discard const
 
Why does the following compile? class Fred { public: Fred(int value): i(value) ...
[5 replies] Last: This blog talks about your const return type, and pretty much says it ... (by kbw)
Constructors/Assignment operators for class with int pointer
 
Hello! This is my current code: #include <iostream> #include <string> #include <vector> #incl...
[12 replies] Last: Those are just reorder warnings telling you that your data members wi... (by seeplus)
by vboro
Capitalize given part of string?
 
Hi everyone! I have a program, where I receive a text from the user. In this string, there are pa...
[4 replies] Last: #include <iostream> #include <string> #include <cctype> using namespa... (by lastchance)
How to write the main function
 
//FuelFlowSensor.hpp #include<iostream> using namespace std; class FuelFlowSensor{ public: Fu...
[3 replies] Last: @OP Here's a practical start. You will need to complete the class impl... (by againtry)
July 2021 Pages: 1... 345
  Archived months: [jun2021] [aug2021]

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