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...
Jun 20, 2021 at 10:14am
[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...
Jun 20, 2021 at 8:53am
[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...
Jun 20, 2021 at 5:27am
[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...
Jun 19, 2021 at 6:54pm
[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...
Jun 19, 2021 at 3:08pm
[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...
Jun 18, 2021 at 6:56pm
[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, ...
Jun 18, 2021 at 1:29pm
[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...
Jun 17, 2021 at 6:39pm
[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= \" \"\" \""); ...
Jun 16, 2021 at 9:15pm
[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...
Jun 16, 2021 at 10:12am
[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...
Jun 15, 2021 at 8:40pm
[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...
Jun 15, 2021 at 6:57pm
[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...
Jun 15, 2021 at 5:12pm
[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 ...
Jun 15, 2021 at 9:50am
[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(); ...
Jun 15, 2021 at 8:58am
[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...
Jun 15, 2021 at 3:24am
[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...
Jun 14, 2021 at 1:59pm
[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...
Jun 14, 2021 at 8:41am
[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...
Jun 14, 2021 at 4:12am
[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...
Jun 13, 2021 at 10:36pm
[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.
Registered users can post in this forum.