General C++ Programming - May 2022

Help Designing An API
 
Would anyone be willing to help me design an API using modern C++ techniques to load and display data from the original DOOM game's data file (WAD)? I've got...
[5 replies] Last: consistency. If its like the standard library (eg, you expose a conta... (by jonnin)
Problemas al realizar el juego del ahorcado
 
Al realizar el codigo, me permite compilar correctamente, sin embargo hay dos cuestiones que no logro solucionar que es que me imprima cuando ya gane, y la segu...
[3 replies] Last: Please learn to use code tags, they make reading and commenting... (by George P)
by Cplusc
Stl to .mesh (1,2)
 
I'm looking for some code to convert the stl file to .mesh or ascii. I would be grateful if someone can share that in case if he has.
[20 replies] Last: @lastchance in my last comment I meant the voulme mesh,not surface. I'... (by Cplusc)
SortableVector Class Template
 
Good morning, I was asked to make a child class called SortableVector attached with the SimpleVector. I am asked to making a sorting algorithm and test it with...
[4 replies] Last: If I am understanding you correctly is that SimpleVector.h is the bas... (by kbw)
Comparing unique_ptrs
 
I have 2 unique_ptr and need to compare whether they contain the same value or are empty This is the code: struct User { int id = 0; std::string ...
[9 replies] Last: I think that's one way to look at it, but device could be a third-pa... (by mbozzi)
by maifs
How to initialize object in a polymorphic way ?
 
Hi I need to create polymorphism and initialize the data in the following way: I need to save new customer detail in files (text) #include <iostream> #include...
[14 replies] Last: The Service class has several member variables apart from source and d... (by seeplus)
Function Overloading
 
How can I create two functions that has the same name GetAve. The first function should have 3 parameters for whole numbers and the second one should have 3 par...
[10 replies] Last: #include <iostream> #include <concepts> // https://en.cppreference.co... (by JLBorges)
by frek
Getting started learning how to use GTest in Visual Studio 2022 (1,2)
 
Hi all, I'm starting to learn how to use Google Test ( GTest ) on my VS 2022 IDE for a simple project called test with this code: int main() { int number...
[37 replies] Last: C/C++ still is a statically typed language. You can use auto only... (by kigar64551)
Library creating
 
Hi, i am having trouble with code, i have a raw code to test my connection between c2000 controller and encoder and now i just need to create .c and .h file to ...
[6 replies] Last: Another meta-search that MIGHT be helpful: https://duckduckgo.com/?q=c... (by George P)
ROUND OFF
 
How to create a program using user-defined function that converts a number with decimal points that you will input to a whole number without using the function ...
[3 replies] Last: Try it with -0.9 (by lastchance)
by frek
Multi threading efficiency on Visual Studio 2022
 
When I run my project on Visual Studio 2022 using 4 threads (the shared data is immutable) since std::cout << std::thread::hardware_concurrency(); prints 4, I...
[7 replies] Last: Also, STL algorithms may already have concurrency built into them, so ... (by TheIdeasMan)
insight on subroutine and global variable
 
Anyone generous enough to share knowledge and insight in truthfulness on comparing efficiencies and speed between subroutine/function and global variable as bei...
[1 reply] : You are asking questions that have absolutely nothing to do with C++ a... (by Duthomhas)
any one can try to fix this ?
 
coz im new in using c++ and my project is to create a vowel counter that showing the count of each vowel #include <stdio.h> #include <conio.h> #include <c...
[12 replies] Last: LOL - also from Macosx by William Stroustrup: Sudden, malicious, smac... (by againtry)
C++ Language Enhance Tools
 
Hi, this is Katy, I am in 2nd year of my engineering, and my interest is towards C++ programming, so I have start learning C++ and I have also start coding, now...
[17 replies] Last: Testing stuff is really about the only time I ever generate absurdly ... (by Duthomhas)
by Heiru
Combining two binary trees into one
 
Hello again. I need to write a function that combines two binary trees that entered by the user into a new binary tree. I have the general program down but i ...
[4 replies] Last: Also there is a problem with add. It doesn't update root if first add.... (by seeplus)
Moving decimal spaces?
 
For this project we are supposed to have a table of decimals produced from our code. The code mainly works fine, it's that I do not know how to move the decimal...
[4 replies] Last: #include <iostream> #include <iomanip> #include <cmath> #include <fst... (by lastchance)
Making a checkers game and cannot get the pieces to move after entering the coordinates
 
I am making a checkers game and cannot make the pieces move after entering the input. I enter the input and the figure does not move. #include <iostream> #...
[4 replies] Last: moving a piece is going to be a multi part thing. you need to erase i... (by jonnin)
Error linking to MySQL
 
Hello, good afternoon, I'm making a C++ program with CodeBlocks (20.03 - MinGW - Windows 10 x64) that connects to a MySQL database but the linker is failing me ...
[10 replies] Last: Thank you very much everyone, I saw that libmysql.dll was missing in t... (by pabloarias98)
by Heiru
deleting the max element in queue
 
I have to delete the max element from the queue without using the queue library, arrays or anything like that. I'm positive the first two functions work like th...
[8 replies] Last: Possibly: #include <iostream> struct elem { int key {}; elem* ne... (by seeplus)
A question about the using of std::uninitialized_copy
 
The following codes can be executed correctly,and print 1 2 3 std::allocator<int> alloc; auto begin = alloc.allocate(3); std::vector<int> ivec ...
[5 replies] Last: Yes ! I tried to disable the check of iterators and the second code ca... (by ningfan666)
May 2022 Pages: 123
  Archived months: [apr2022] [jun2022]

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