General C++ Programming - October 2022

LRU Cache Simulation Heap Overflow Problem
 
Hi, I'm new to C and are working on LRU Cache Simulation recently. However, when testing testcase w/...
[6 replies] Last: And if there's anything that I can improve, maybe the coding style? A... (by kbw)
by t im
about address of std::vector<std::vector<int>>
 
Please frist read the code below: vector<vector<int>> v({ { 1 }, { 2 } }); v .push_back(3); v ...
[5 replies] Last: Thanks for all your answers that help me figure it out! (by t im)
by t im
resize() and reserve() of std::vector
 
In most cases, resize() changes the size of a vector while reserve() changes capacity of a vector. M...
[7 replies] Last: Thanks for all your helpful reply. I get it. (by t im)
Tree (traversal)
 
Please help what is wrong with my codes? I created Tree.cpp. main.cpp and Node.h, Tree.h. It gives m...
[1 reply] : At a cursory glance, Tree.h needs to declare the type Node . #ifnde... (by JLBorges)
by Cplusc
OpenMP for nested loops
 
I am writing a lattice boltzmann solver and to do so I'm using OpenMP for loop parallelization. Afte...
[9 replies] Last: @salem c the code is easy to read. I almost used <= everywhere Expect ... (by Cplusc)
Cannot convert argument from 'variable' to 'const T &'
 
Howdy. I am using a doubly linked list to obtain requests from an input file and eventually place th...
[8 replies] Last: As a starter code that compiles, consider: #include <iostream> #inc... (by seeplus)
by Cplusc
Animation
 
I'm doing a fluid simulation and for post processing I'm using paraview. For this, I need to reaload...
[1 reply] : Paraview is a completely separate application. I'm not sure that it wo... (by lastchance)
Boost Python: "Mixing a dll boost library with a static runtime is a really bad idea..."
 
I am currently trying to create a python binding for a large C++ library. After some searching, I ha...
[1 reply] : Current code: #define BOOST_PYTHON_DYNAMIC_LIB #include <exception>... (by Mathhead200)
Accessing private member declared in header
 
Howdy. I have a doubly linked list class that I was given the function names for. One of them is cal...
[2 replies] Last: Many thanks. I didn't check the provided members well enough before I ... (by malibuwiley)
Please explain what this code does
 
Hello all , All i know , This is a Buffer for thiscall Function struct sAABuffer_Helper { DW...
[no replies]
C++20 Modules as interfaces
 
Hey guys, I'd like to use C++20 concepts to define interfaces. Usually I'd define interfaces using ...
[6 replies] Last: cool thank your very much. I'm getting a better understanding of conce... (by JuliusCaesar)
how to convert message digest to bigInteger in c++
 
For example say I have a message digest "cf91cc61b74a1feda9902ae9b9e96d9a" using md5() How do I...
[9 replies] Last: You do not need to compile Boost Libraries to use the Boost cpp_int ... (by Duthomhas)
smart pointer issue with file
 
Hi I am facing a problem while trying to create file manager using smart pointers. Which option (u...
[5 replies] Last: Maybe I am just slow today, but I hope you understand this, and maybe ... (by jonnin)
Error on multi-D dynamic array output
 
How solve the error on multi-D dynamic array read to be output below? #include <iostream> #include...
[3 replies] Last: #include <iostream> #include <vector> using namespace std; int main(... (by lastchance)
data struct selection
 
Which data structure is more ideal here? 1)Frequently need to add and remove elements from the middl...
[10 replies] Last: Thanks everyone for your inputs. This thread can be closed. (by leo2008)
does vector <int> myVec [5] creates 5 vector?
 
and list<int> myList creates 10 linked list? the and () seems to be very different.
[6 replies] Last: std::vector<int> myVec creates a C-style array with 5 elements, eac... (by deleted account xyzzy)
How does vector initialize and allocate in one line?
 
How, as vector<int> n(9) is allocating, can vector initialize and allocate in one line (as giving er...
[3 replies] Last: Note that the number that you pass to the constructor (inside the pare... (by Peter87)
Linker 2019 error unresolved external symbol
 
I am pretty sure I have something wrong with how I am using my templates like syntax. I am making a ...
[8 replies] Last: Including a .cpp into my header (I know I should not do this now) I t... (by Ganado)
by Cplusc
how initialize an object of a class which is defined within a name space
 
I am trying to initialize the ex and ey variables in the following piece of code but unfortunately I...
[10 replies] Last: Well, strictly you could use MPI_Allreduce, but I take your point. (by lastchance)
Object oriented programming menu troubles
 
Hello all, i am in a programming 2 class and thought i was understanding quite well, but i am gettin...
[6 replies] Last: If you post a file data sample, we can provide advice as to how best r... (by seeplus)
October 2022 Pages: 123
  Archived months: [sep2022] [nov2022]

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