General C++ Programming - April 2020 (Page 4)

by Nnnb19
Transition between two different values
 
I need to make a transition between two different values and get all the numbers in between. For ex...
[4 replies] Last: ... (by salem c)
Removing items containing references from a std::vector
 
I have a vector that holds references to animations, something like: class SwapAnimation { ...
[2 replies] Last: thanks, I've switched to forward_list, as it fits perfectly in my exis... (by tofiffe)
Is the math.h library written in binary or c language?
 
Can anyone tell me if the implementation of functions of cmath library is in binary or C?
[4 replies] Last: @ TheToaster C++ is a proper superset of C. I see no reason why C-rel... (by Duthomhas)
need help writing to outfile
 
hello every one i am writing a code for a class and i have it almost completely written i just need ...
[4 replies] Last: Writing to cout is actually the right thing to do. If your program i... (by dhayden)
by bsmith
Struct Destructor
 
I am having trouble figuring out how to setup a destructor for a struct. Here are the items within...
[3 replies] Last: To be clear about what Ganado said, your Node class doesn't need a des... (by dhayden)
my list implementation is very slow (1,2,3)
 
Why is std::vector super faster than my list implementation, and how can I optimize this template...
[42 replies] Last: Getting back to the original question of list vs. vector (whether you'... (by dhayden)
Making user menu repeat until choose to quit
 
I know this is pretty novice but for the life of me I cannot get this program to repeat itself. Any ...
[3 replies] Last: #include <iostream> using namespace std; int ipow( int base, int exp... (by lastchance)
Need a Code for making a Cube design
 
I am searching for c++ code to make a cube design . so do anyone done that before i need help. thank...
[13 replies] Last: hi salem i am using windows 10 (by shawon58)
Courier system using classes
 
Hi, i just need help for the understanding of the following question and no codes please. I will be...
[5 replies] Last: Following on what Jonnin and Learner2 said, write a draft of your clas... (by dhayden)
Adding text files in Clion
 
Need help adding text files in Clion? or to create them to then write some data? I am trying to add ...
[6 replies] Last: I am trying to add some text files to a program If you have a progra... (by dhayden)
Interacting with elements in a given room in a text based RPG
 
So I'm writing a text based RPG using OOP in C++ for a University project. I've designed a class for...
[12 replies] Last: The reason you are getting that error is because you tried to make an ... (by TheToaster)
Parking system implementation using Classes Test Question
 
I just gave my online test and this question was given to us. I used an function in which an array...
[6 replies] Last: Thx guys (by A55a551n)
by bibo
Runtime error - using structs in cpp
 
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *le...
[6 replies] Last: Cool. I think i have some bug in logic of my code causing segmentation... (by bibo)
by sfml
How can i make 3D games with SFML anf OpenGl?
 
Just like the question says how can I create 3D games with SFML and OpenGl and set it up with Visual...
[1 reply] : For setting up SFML with Visual Studio, I would go to the site's tutor... (by Ganado)
Namespaces, Enums, Unions, and Struct
 
Hello! I am currently in Data Structures and my teacher did not cover these data types. I am very c...
[10 replies] Last: C++ made that undefined behavior ^^^ you can only use a union to look... (by jonnin)
Coordinate Walk Program
 
Hey guys! It's my first time here, so sorry if I don't know the rules too much. Please correct me fo...
[2 replies] Last: #include <iostream> #include <cstdlib> using namespace std; int main... (by lastchance)
by mk7mew
Homework assignment [Help]
 
This is super beginner C++ class, using basic math and loops. I'm having trouble having the code...
[4 replies] Last: @maytambo, is that really ALL of your code? It is missing two closing... (by deleted account xyzzy)
by kitfox
How to use smart pointers to maintain a nested hierarchy of objects?
 
I'm trying to figure out the right way to use smart pointers to implement a basic tree like structur...
[17 replies] Last: Well the reference won't be invalidated while you are holding it, if t... (by TheToaster)
by bsmith
Linked List Destructor Help
 
When running valgrind on my program, it is not showing any memory leaks, however I am still getting ...
[4 replies] Last: There's no point passing head into destroy. And head should be set... (by dutch)
Using my Timer Class with my Object Class
 
Hello all, Up until this point I had no problem with my 3D Mesh Object class I used for my game e...
[5 replies] Last: Nevermind! Someone (alldayeveryday) on freenode's ##C++-general told m... (by TomTheFox)
April 2020 Pages: 123456... 10
  Archived months: [mar2020] [may2020]

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