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

getline
 
hey guys so im trying to have a user enter a word and it finds the anagram and as long as the user keeps entering the word it keeps finding the anagram but when...
[5 replies] Last: int main() { hw h; for (string a; cout << "enter a word (press en... (by seeplus)
Going about creating a Truth Table Generator
 
I am having trouble thinking about how to make it. I'll like the user to enter a compound proposition, base on valid logical operators, and create a truth table...
[3 replies] Last: https://linux.die.net/man/1/eqntott (by mbozzi)
Black Jack Project
 
The hotel owner wants to update the blackjack game you previously created to make it faster. Write a Blackjack game using classes and linked list. Requi...
[8 replies] Last: using vs writing. I believe they probably DO want you to make your o... (by jonnin)
by mnm71
How to sum some float
 
In this code I want to read last n lines that contain float numbers and get an average of them, I get right float but the result of sum and average is not true...
[1 reply] : #include <iostream> #include <fstream> #include <vector> #include <n... (by seeplus)
Need help solving an issue in my entity component system.
 
I need some help fixing an issue in my entity component system. So I have a registry class which contains two containers: using View = std::unordered_map<Ent...
[2 replies] Last: @helios No, ecs::Entity is a type alias for std::uint32_t (by Gringoliath)
Calculate the overlapping area of two rectangles
 
Hi! I have an assignment due to tomorrow at noon and I tried figuring it out myself but I failed. I'd be more than grateful if someone could help me! Yo...
[6 replies] Last: LOL, I didn't do anything, but there we go :) (by againtry)
Make dynamic link .so file from many C sources
 
How do we build/make one dynamic link .so file from many C source TUs (translation units) as gcc -o foo.so -shared -fPIC foo.c merely of a single .c file ?...
[1 reply] : Either gcc -o foo.so -shared -fPIC foo.c bar.c baz.c quux.c ... or ... (by helios)
where “*.exe” and “*.dll“ files
 
Hi everybody, I really thank you for the help you always provide. I am working with “Microsoft Visual Studio 2008, C++”, because my entire old programs hav...
[2 replies] Last: You could set your project's options to not use the C/C++ runtime libr... (by deleted account xyzzy)
How to search a binary tree with user input
 
Hello. I am trying to search for an element in a binary search tree using a class object but I cant get my code to work right. I have a class called Stock which...
[5 replies] Last: I think you CAN use result as a local because its value is always null... (by jonnin)
To compile our own libffmpeg.so supporting H264
 
Sorry not being truly C++. How to create/compile our own libffmpeg.so supporting H264 (or H265 too) codec, just as instruction on https://trac.ffmpeg.org/wik...
[3 replies] Last: What I remember is running make after ./configure and building both th... (by helios)
Memory pool and its allocator for STL containers
 
Dear experts in C++ I am considering whether to utilize memory pool, and its use for allocation/deallocation via allocator. (such as boost::pool_allocator et...
[5 replies] Last: You messed up the link by adding the angle brackets. https://www.cplu... (by deleted account xyzzy)
Deleting in the file
 
I have a code that is generated and placed in input.txt. In output.txt. modification occurs with these sequences. But when you open the file again, the old valu...
[4 replies] Last: Observe the result. Then add a few lines at a time until you notice ... (by onetwo123)
by alexas
alternative to std::make_tuple
 
Hello, In my function I am returning: return std::make_tuple(rx, ry, rz); where rx,ry,rz are floats. Profiler shows me that exactly this consumes a ...
[8 replies] Last: Update: I managed to increase speed apprx around 30% when I changed t... (by alexas)
by mnm71
How create thread from float function?
 
In my class I have a float function that should work always and return value to use it in other place, but I can't create thread for this float function pthr...
[6 replies] Last: @salem c, Thanks for the help but I still have a problem, now the issu... (by mnm71)
emulator hack
 
Hi, how can i use c++ to hack games like free fire or PUBG?
[4 replies] Last: there is no generic how-to do this kind of thing. You have to dig in ... (by jonnin)
i need help with a loop program
 
Integers are read until the number 0 is met. Display all triplets of numbers read consecutively, with the property that they can represent the sides of an isosc...
[15 replies] Last: Shouldn't the tests for 0 be before the tests for side equality? Also,... (by seeplus)
Cast
 
In the first version my code gives me double. In the second version it gives me int. Why that? 1 version: std::cout << "Making and changing of container wit...
[6 replies] Last: You've divided by 2.0, which is a double, so result is double, not int... (by kbw)
by cmdEvo
Exception in constructor
 
Hi everyone, Is it possible (clean ?) to use the factory design pattern to avoid throwing exceptions from constructors ? Note that I would like to impleme...
[8 replies] Last: [quote=cmdEvo]the factory should have returned a null shared_ptr I thi... (by Cubbi)
How to get the difference between 2 strings and store them?
 
Hi all, I'm using VS2008 with C++98. I would like to find the differences between 2 given string, extract and store them. For example, String A: Box 1 is pul...
[11 replies] Last: Once you have the numbers in the vector, you can use them as you need.... (by seeplus)
c++ game programming
 
Hi guys i have some questions for you: 1. What is the best engine for game developing that uses c++, for begginers? 2. Can i start make games with c++ if i have...
[2 replies] Last: thx (by grooviqw)
November 2020 Pages: 1... 34567
  Archived months: [oct2020] [dec2020]

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