General C++ Programming - February 2021 (Page 2)

embedded c++
 
Aloha everyone, I am new to C++ and I need for a project to connect a 32-bit microcontroller with a gy-521 sensor, read and store the data. Since I have never ...
[1 reply] : > for a project to connect a 32-bit microcontroller with a gy-521 sens... (by salem c)
Can I force a derived class to define a copy/move operator/constructor?
 
Hi. I want to force a derived class to define user defined copy constructor/assignment operator, and move too. It will be good if acting like a pure virtu...
[5 replies] Last: The point is that you can't copy or move Derived trivially. @keskive... (by thmm)
Unable to see how string is printed?
 
Unable to see how string is printed after the printf in the before line. #include <iostream> using namespace std; int main() { // your code goes here cha...
[2 replies] Last: Sorry, never saw such for long time. It is now visible that the contai... (by ajiten73)
by frek
The algorithm std::sort uses
 
Hi all, #include <iostream> #include <algorithm> #include <vector> template<class T> class myclass { public: bool operator() (T i, T j) { return (i < j);...
[8 replies] Last: Thank you. (by frek)
Code not working and I'm unsure why
 
So I'm trying to type out the code below that insults my brother in law when he types in his name after being prompted, says i love you to my girlfriend, and ca...
[6 replies] Last: why wouldn't i format it as cin.getline(name); That calls member ... (by keskiverto)
Summing the nodes of a linked list
 
I am reposting this question as a new thread here since it was previously in another thread and not easily visible. I have a singly linked list and I want to ad...
[4 replies] Last: Thank you last chance, I finally found the code : double sumnodes()... (by gevCplus)
by frek
Stream iterators code review
 
If we want to understand the code below which works appropriately: #include <iostream> #include <fstream> #include <vector> #include <algorithm> int main() {...
[7 replies] Last: The program compiles perfectly on my VS 2019 (using C++ 17). Differe... (by dutch)
How to identify a function's logic in ghidra
 
Hey, I was curious how one would understand how to identify a function's logic in Ghidra? For, example, the function maybe is used for a boss fight in-game. So...
[no replies]
Code does not return values
 
The objective is to write a code using class and constructor as student with 4 data members: Name, id, Age and Address. The issue is my code does not return the...
[4 replies] Last: Thanks, I mistakenly entered ; instead of : Its not giving Error mes... (by NoobcoderMV)
Custom URI scheme handling
 
Hello! Can anybody give any hints on how to register and handle opening of custom URI schemes ideally in all OS platforms otherwise only in Windows?
[no replies]
3x3 matrix
 
What help do you need? Do you know mathematically how to calculate the determinate of a 3x3 matrix by using determinates of associated 2x2 matrices? Can you def...
[1 reply] : a 11 ( a 22 a 33 - a 23 a 32 ) + a 12 ( a 23 a 31 - a 21... (by lastchance)
by frek
The cheapest STM eval board to get started with C++ embedded programming
 
It's a while I've been getting started with embedded programming using modern C++, and now have got a couple of questions: 1) First I need the cheapest STM ev...
[11 replies] Last: Thank you all very much. And a special thanks to Grey Wolf for both th... (by frek)
How to use GCC to generate asm code from .z64 file
 
I am curious how to use GCC to generate asm code from a .z64 rom file? If there is no way with GCC, can you provide some other ways to achieve this thanks.
[2 replies] Last: Try searching: R4300 cpu R4300 disassembler z64 file structure (by dutch)
How effective is pseudocode in Decompilers/disassemblers
 
I was curious if ida-pro or ghidra takes a function lets say it handles player movement and decompiles it into pseudocode .c code is this code valid for that f...
[no replies]
by Zenzei
Variable used without being initialized...help me plz
 
Okay...so this time We are having issues with our pricing on server.. The exe keeps hitting an error that ive tried and failed to catch.. can someone maybe ...
[5 replies] Last: Why don't you use auto in your code? With auto you can never forget t... (by thmm)
by geefi
How solve this bug? allegro 5 library
 
basically, a time after the user press the movement keys, the character disappears and got substituted for a color white rectangle, see the video for understand...
[no replies]
Finding Area and Perimeter w/ Functions
 
I've been stumped on this for a little bit now, error code keeps saying that "'display': function does not take 2 arguments". #include <iostream> using name...
[3 replies] Last: There are other issues. double calcAreaPerimeter() { double len, w... (by seeplus)
by PacR
Need help with asio::ip::tcp::endpoint & ::socket constructors
 
Is it possible to declare and initialize asio::ip::tcp::endpoint and asio::ip::tcp::socket without using constructors? For example: #include <iostream> ...
[4 replies] Last: Thank you Mbozzi! (by PacR)
What am I doing wrong here with this Switch statement?
 
I have to create a program that asks a user to guess a random number 1 to 5, gives a statement for each value, including if they guess the number correct, using...
[5 replies] Last: PLEASE learn to use code tags, they make reading and commenting on so... (by George P)
Problem with string in Class
 
If i run this code with just the object zip3 it runs fine but if i use any Zipcode objects before the string variable no longer works. It wont output even befor...
[5 replies] Last: Hello Andy, I was just working on a practice project from my book bas... (by jimmy10)
February 2021 Pages: 1234... 6
  Archived months: [jan2021] [mar2021]

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