General C++ Programming - June 2021 (Page 3)

How to create a Linked list with multiple variable
 
How to create a linked list of size 6 that keeps following id values: "01", "02", "03", "04","05","06" following age values: 30, 41, 50, 35, 55, 22 foll...
[2 replies] Last: Are you required to write your own list class - or can you use the exi... (by seeplus)
Stuck on C++ Segmentation fault while working with String
 
Stuck on C++ Segmentation fault while working with String here is the full code. #include <iostream> #include <string> template <typename K, typename V> cla...
[5 replies] Last: Thanks (by lablnet)
Copy member function of expression template
 
I am trying to write a library using expression templates, and I need to find a way to copy the expression in an variable without evaluating it (for example I w...
[no replies]
Operator Overloading Questions
 
Hello, this is my current code using operator overloads: #include <iostream> #include <string> typedef unsigned int u32; typedef unsigned char u8; class Cons...
[4 replies] Last: @Ganado Thanks! That is a problem. I will do my best to watch for su... (by SirEnder125)
now() cannot be converted to sys_days!
 
Having trouble with: auto n = std::chrono::system_clock::now(); std::chrono::sys_days sd = n; Why ? n is a time_point and sd is also time_poin...
[2 replies] Last: thanks!! (by JUANDENT)
by volang
Return only when one of multiple files has data
 
With Unix Epoll and Windows Completion Port we can read from multiple fd's/sockets at the same time and as soon as one of them has data to read epoll/completion...
[6 replies] Last: epoll is Linux specific, it only works with real files (not streams li... (by kbw)
Inline ASM in G++ (Eclipse)
 
Hello. I want to test my basic knowledge of ASM with a simple add(a, b) function, that adds a and b using assembly. I have never been able to use inline ASM, ...
[11 replies] Last: Alright. Thank you! I don't really use VS anymore, I generally use Ecl... (by SirEnder125)
I need to write a program that will find its way in the letter maze
 
Greetings I need to write a program that will find its way in the letter maze. The letters of the Ukrainian alphabet are written in 64 cells of the 8 x 8 s...
[4 replies] Last: I don't want to tell you exactly how to change the program because I w... (by dhayden)
C\C++: how compare aspes? (1,2)
 
see these string: text.push_back("var const hell as integer= \" """" \""); now see these string: text.push_back("var const hell as integer= \" \"\" \""); ...
[21 replies] Last: i'm sorry something. ok... i save it.. sorry something and thank so m... (by Cambalinho)
Language manager approach with design patterns
 
Hello fellow programmers! In my current project, i work on a small plugin system, and everything works perfectly fine, but i can't find the right approach to...
[2 replies] Last: Thanks, that helped me alot! i have read quite a bit from the link you... (by JustShinigami)
JavaScript Calculator
 
I know this is meant for C++ but i think there must be someone who could help me with js :) i have a code for a simple calculator in js but there's a problem...
[3 replies] Last: It looks like the only possible to use addition, subtraction, multipli... (by zapshe)
Numbers from 1 to 33 are written in 64 cells of the 8 x 8 square. Almost finished code, need to add it.
 
Hello everyone, I have an assignment which is as follows: "Write a program that will find a path in a numeric maze according to the specified rules. Numbers fro...
[11 replies] Last: These algorithms work very much the same way that you'd solve it by ha... (by dhayden)
Creating dynamic allocated array of pointers
 
how to create array of pointer with dynamic allocation? I want to change this following code: const int NUM =5; int *arrPtr = {nullptr,nullptr,nullptr...
[2 replies] Last: Thanks a lot ! (by dntwk707)
Wrapping a C function pointer as a parameter with std::function<> for an old API
 
I am trying to communicate between applications with NATS.io. In order to asynchronously get a message when a publisher pushes something to a subject, you can ...
[2 replies] Last: I am not sure I understand this part static void static_onIdReques... (by kaptsea)
Removing data from file
 
Why does the name I entered wont delete from the file char delUser ; ifstream testing; testing.open("Session.txt"); testing.clear(); ...
[10 replies] Last: In C++20 if that can be used, std::string has the method .starts_with(... (by seeplus)
Adder
 
Hi guys, I'm trying to make a basic adder, why? Just for fun. I thought this would be rather trivial but I've stumbled a little. Firstly when I try to pri...
[6 replies] Last: And the source of that can be seen at first hand by reading the header... (by againtry)
by volang
No runtime error
 
Hello. Quick question... When I write: string a(&data , data); ...this should exit the program with a error message like "string out of bound", but at th...
[11 replies] Last: Using at() will cause an exception to be thrown if you attempt to ac... (by MikeyBoy)
Numbers from 1 to 33 are written in 64 cells of the 8 x 8 square. Finished code, need to be redone.
 
Hello everyone, I have an assignment which is as follows: "Write a program that will find a path in a numeric maze according to the specified rules. Numbers fro...
[2 replies] Last: I agree with you, but the code isn't mine, I don't understand it a lit... (by sergeyutkin221)
Trying to update some legacy code
 
Hello, I have recently decided to try and get an old project dusted off and see if I can update it to a newer compiler and C++ version. The project will compile...
[2 replies] Last: Thank you for your speedy reply! Adding typename seems to have fixed t... (by NimrodPSI)
Preprocessing an array of Python images OpenCV
 
I have a Python array of images called args that is fed into a preprocessing function. In addition, the function gets an empty Python array res_1 of the same si...
[3 replies] Last: double free is fixed in 2 ways. 1) stop doing it. one allocation, on... (by jonnin)
June 2021 Pages: 12345
  Archived months: [may2021] [jul2021]

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