General C++ Programming - October 2022 (Page 2)

How to print Eigen tensor EVERY iteration?
 
I made an older post about printing an Eigen tensor into a text file and where the example I am usin...
[5 replies] Last: @mbozzi Thanks A LOT! This is perfect. (by JamieAl)
File stream read in error
 
Hello! Context: I am making a simple code to read in a maze from a file the maze should look like th...
[2 replies] Last: Thank you and also I added the code tags ty for the article (by kailarob)
how to prevent duplicate when compare 2 string vector.
 
#include <iostream> #include <vector> #include <random> #include <algorithm> #include <itera...
[5 replies] Last: It has been a while since I have used c++. The forum format has change... (by oggin)
by Cplusc
elseif condition in macro
 
anyone knows why I am not getting the _dim and _nnodeLtc correctly from the following piece of code?...
[13 replies] Last: thanks for your answers. (by Cplusc)
how to print Eigen tensor to text file?
 
I am trying to print a 3D matrix into a text file and use it to make plots in MATLAB. I have been us...
[6 replies] Last: The issue is this is readable as 16x256 instead of 16x16x16. Same ... (by lastchance)
sort option needed
 
which sort (bubble,quick, merge) option best suited here? 1)A list sorted except for one item, whic...
[12 replies] Last: Better to use the C++ library for most uses of sorting instead of rel... (by keskiverto)
Error when taking max value of Eigen tensor
 
I am trying to get the max value of an Eigen tensor, something equivalent to max(max(max(T))) in M...
[4 replies] Last: @lastchance Thanks! I am confusing myself A LOT because I am using MA... (by JamieAl)
How to do dynamic scoping
 
How come not able doing a dynamic scoped variable, how to do dynamic scoping in c++ as this illustra...
[6 replies] Last: Respectfully @abdulbadii I don't understand why you don't want to use ... (by Geckoo)
inline assembly
 
hello all , i make hook to read some address from ebx to this value all work good But every time ...
[no replies]
Output inside function mismatches outside function
 
Why does my function returns zeros when called in a script but then if I try to print out the output...
[2 replies] Last: @JLBorges oh I see. Thanks! (by JamieAl)
One explain on initializing each vector argument.. please
 
one outright understand definitely each vector argument in initialization (v) ? enum Mon : int { ...
[2 replies] Last: When posting code, please use code tags so that the code is readable ... (by seeplus)
by t im
Virtual function and class inhertance
 
I'm confused about the code below: class A { public: A() { bar(); }; virtual ~A() { bar(); }; v...
[4 replies] Last: Truly grateful for all your help. I get it. (by t im)
by t im
About std::move string and int
 
string s1 = "str"; string s2 = move(s1); // s1 is empty int num1 = 1; int num2 = move(num1); /...
[5 replies] Last: Thanks for all your relpy. I get it. (by t im)
by t im
Const with function
 
What is the difference between 'const' before and after function name in the code below: const i...
[5 replies] Last: I guess I must have misread the question because I ended up answering... (by Peter87)
How to copy data to an Eigen tensor?
 
I am trying to copy the output of an array after taking the 3D FFT to a complex Eigen tensor and I a...
[3 replies] Last: @mbozzi wow! I mean, I almost gave up on this particular issue. Thanks... (by JamieAl)
What's this using usage on a class name
 
what is using for a class name scoping the name too ? as read one's code class T { public: virtu...
[1 reply] : You are inheriting the constructors from T. https://en.cppreference.c... (by Peter87)
Help ensure/confirm type of..
 
The type of array index is std::size_t isn't?
[3 replies] Last: Note that if you have an index of type int and are comparing it's valu... (by seeplus)
issue with code
 
Can anyone tell me the issue with below code? will it be segmentation fault? #includ...
[2 replies] Last: The type of str is const char* (pointer to const char) and not char*. ... (by seeplus)
How to take 2D FFT of 3D matrix?
 
I am using eigen tensor to define my 3D matrix and would like to perform a 2d fft on it. Originally...
[12 replies] Last: So, this works for 3D FFT for a sine test function and I will be doubl... (by JamieAl)
WPA2 Handshake extract hash value?
 
Hello there, i recently wrote some lines of C++ code to read in wordlists, to chunk them up into ...
[no replies]
October 2022 Pages: 123
  Archived months: [sep2022] [nov2022]

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