General C++ Programming - November 2020 (Page 7)

Deleting in the file.
 
In the code, I have described the File (), Modify () and Add_Sum_Avarage () functions. File () must fill the file of the number, Modify () does some modificatio...
[3 replies] Last: @seeplus std::ofstream out("input.txt", std::ofstream::app); sorry,... (by onetwo123)
how convert image to emoji in c++ ??
 
hello everyone : actually I have some complicated problem but it's very very easy for professional programmer anyway my problem is in this simple program "Emoj...
[1 reply] : I found ( all codes + all new faces ) need in here : https://github.... (by mostakim hamza)
Trouble with Insert and delete functions
 
Hey ya'll I'm having some troble with my linked list delete and insert functions. My delete function deletes the node at the given position. I'm having trouble ...
[1 reply] : O(n) insertion & deletion operations defeat the purpose of using a sin... (by mbozzi)
Project Help how many days are we into the year for a given date
 
The project ask to create a function to find how many days are into the year int daysIntoYear ( int year, int month, int day ) ; AND Please have your code s...
[1 reply] : Please use code tags for your code to be easier to read. http://www.cp... (by Hezigon)
HardwareTimer for STM32 (blue pill) board
 
I'm trying to implement class function from "hardwareTimer.h" lib. There are two versions of the function: "void hardwareTimer::attachInterrupt(int channel, ...
[5 replies] Last: For platform I am using (Arduino IDE) std::make_shared<>() doesn't wor... (by Louis91)
Custom allocator for unordered_map<int, vector<Type, allocator> >
 
Dear all, Now, I am using TBB, and memory_pool_allocator for scalable memory allocation. I use unordered_map with its value as vector, and the vector uses...
[2 replies] Last: Dear mbozzi Thank you for your detailed reply. BTW, if I use not st... (by Mitsuru)
Fast destroy (=clear) std::unordered_map (or concurrent_unordered_map)
 
Dear all, I encountered a high overhead of destruction (= clear) for std::unordered_map (& concurrent_unordered_map). I use std::unordered_map<int, std::u...
[5 replies] Last: I found library for polymorphic memory resources is in boost, I will t... (by Mitsuru)
Event-driven- and widget/window programming
 
I search for (a) good book(s) or tutorials that/whose covering all the basic topics about how the internals about event-driven programing like how the event que...
[3 replies] Last: It's a pity for that I couldn' take a look inside the book. It's ava... (by dutch)
parameterized constructor
 
Is there any process in c++ by using which I can initialize my class object after declare where my class has parameterized constructor . For example : class myc...
[6 replies] Last: Consider: #include <string> #include <iostream> class Myclass { pr... (by seeplus)
Search function not properly working
 
Hey ya'll, I'm having an issue with my search function, which is supposed to search a linked list for a value the user enters. I seem to have trouble with my lo...
[3 replies] Last: An alternative could be (not tried): void ColorsList::searchList(co... (by seeplus)
File input.txt
 
Write a function to prepare a text file input.txt by storing 100 random integers in the range from -50 to 50, one per line. The file is returned as a result. W...
[7 replies] Last: which will display the contents of the container D, add elements to D... (by onetwo123)
Using a 1D array on a 2D array to calculate movement
 
Hello! I'm a first-year CS student and no this isn't homework help, this is personal project help for a project just for fun. So I've been attempting to recreat...
[2 replies] Last: I appreciate the response, we aren't that far into learning C++ and we... (by Omnivion)
Algorithm search_end_if
 
I wrote an algorithm using a functor. For example, there is a condition that the elements must be greater than zero. But this implementation doesn't work. Curr...
[7 replies] Last: Um... where else would you put it? I started learning it not so far. ... (by onetwo123)
Fibonnaci algo confusion
 
the algo here is printing the wrong data. I am not getting where am I wrong? Can anyone help me? #include <iostream> using namespace std; int fibser...
[5 replies] Last: You have a function that returns an integer value: // function int fi... (by keskiverto)
Need Help Please!
 
So im kindave stuck on this problem i have and would greatly appreciate some help. i pasted the question in and the code that i have written so far im just lost...
[2 replies] Last: You can double check your output with a calculator like this: https://... (by againtry)
Linked List only displays first node
 
Hey ya'll, I'm new to linked lists and I'm having some toruble with displaying my list. I created a function which appends nodes to the list, as well as a displ...
[4 replies] Last: Ahhh, I see the error now. Thanks for the help :) (by oceanSpray)
by dutch
Drunkard's Walk
 
I thought the average distance the drunk would walk is the sqrt of the number of steps. However with 10000 steps I get a distance of about 90, whereas sqrt(1000...
[11 replies] Last: And, int NO_MOVES{10000}; int NO_TESTS{10000}; gives, RMS di... (by againtry)
Resize a square
 
Hey, In a part of my programm I want to resize a square. This is my code: const int MAX = 50; class square { public: square(); void print(); p...
[1 reply] : You don't seem to be setting height/width anywhere? Why use MAX? Shoul... (by seeplus)
Calender Program (1,2)
 
Write a program that collects from the user only two pieces of information – (1) the year and (2) the day of the week on which January 1st of that year falls....
[22 replies] Last: @naveenmmenon This is what indentation should look like. #include <i... (by salem c)
arrays and loops
 
I am pretty new to programming, so I guess be advised. I am trying to take a user input, here for language, and compare it to an array. So, if the user input...
[4 replies] Last: Thanks for the help, I ended up using the algorithm. (by paleryder311)
November 2020 Pages: 1... 567
  Archived months: [oct2020] [dec2020]

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