General C++ Programming (Page 4)

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)
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)
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)
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 resabzr)
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)
Sort an input file for a specific value
 
Hello, I am trying to sort an input file by a specific value (price), then print the sorted list to...
[9 replies] Last: Thank you everyone. I was able to finish the project. (by Fayezilla)
Help with partial match peg counter in Mastermind game C++ code
 
Like the title says, I am coding mastermind in C++ have already completed it, the counter pegs are g...
[4 replies] Last: #include <iostream> #include <vector> using namespace std; template... (by dutch)
Reading binary file data into struct object?
 
Hello. I do not know if it's the right way to do this, but I have this code: #include <iostream> ...
[5 replies] Last: How did you write the information to the file? You really shouldn't b... (by jlb)
by Borneq
Smart pointers and trees
 
I have Node: int level string name Node* parent std::vector<std::unique_ptr<Node>> childs; I cr...
[4 replies] Last: Perhaps something like (NOT tried); #include <memory> #include <str... (by seeplus)
Why do I need to use “pointer to pointer” in this situation?
 
why I have to use "pointer to pointer" in the function "InsertAtFront" This is the reason: (*head...
[5 replies] Last: OP is a spammer. Yeah. The original post has now been deleted - wh... (by seeplus)
Pages: 123456... 9
  Archived months: [may2021]

Cannot post in this page. To post a new message, go to the first page.