Beginners - April 2020 (Page 10)

by sturk
Not printing out correct values
 
Why is it not printing out the right values? I'm lost. Need help. Thanks. #include <iostream> #i...
[2 replies] Last: In push_back you write the value to the wrong location in the array an... (by Peter87)
Need some quick help, would appreciate
 
Hello guys, I have problem printing what I just inputted from line 26th. When I try cout in line 48t...
[7 replies] Last: Since original data are too secret to be shared, let’s venture funny... (by Enoizat)
Compiler defines and reading the standard library code?
 
Hi guys, So a two part question here, First off I noticed a lot of C++ code and C code for tha...
[5 replies] Last: [quote=adam2016]std::vector and other containers, they almost look cry... (by Cubbi)
by pkdir
Return enum with most occurrences
 
If I have an array of structs that contain an enum of type Fruit , how can I write a function using...
[1 reply] : Following the KISS principle I would copy the values into a std::map a... (by thmm)
by Zanza
Undeclared identifier in grading program
 
I'm trying to add a menu to my previous program as well as make it more modular by turning the scree...
[3 replies] Last: This is your code after having removing all the unused declarations an... (by Enoizat)
by hbcpp
Simulated environment for performance
 
I know that C++ is the language of choice when performance is critical, when speed is a must. That's...
[1 reply] : About the move vs copy speed comparison have a look at this post on SO... (by thmm)
by Faizts
out put not working return value problem
 
#include <iostream> #include<cmath> using namespace std; class Calculator{ public: float Ad...
[2 replies] Last: i just fix it not add output tag (by Faizts)
queues
 
I have a queue which represents people waiting in line at a bank. There is also priority queue who h...
[2 replies] Last: That is correct. cust.transaction_start_time is equal to previous cust... (by stoneJax)
by sparki
C+ delete operator doesn't work properly
 
Getting an exception thrown error. #include <iostream> #include <vector> using namespace std; cl...
[1 reply] : The problem is on line 89. You make a shallow copy and both pointers p... (by thmm)
by DJL
Looping and order of operations help
 
Hello, I am new to C++ and have been working through a bunch of problems for school. Im really stuck...
[13 replies] Last: You can always make your own swap like this: double temp = start; s... (by dutch)
by alexko
Colon sign with case and enum
 
Hello. I tried to find an answer and all of them in the archive, but they didn't explain my example....
[6 replies] Last: https://www.learncpp.com/cpp-tutorial/53-switch-statements/ (by deleted account xyzzy)
How to skip over a space when my while loop is supposed to stop at a space.
 
Hello! I really appreciate how this forum helped me understand my assignment. I have started on it b...
[1 reply] : else if (c == '@') { while (!stack.empty() && stack.top() == ' '... (by dutch)
by flav32
Creating singly linked list
 
Is there any way to work with linked lists without writing the CreateList() function every single ti...
[5 replies] Last: Thank you! I understand the concept, the logic behind them. I could de... (by flav32)
Converting a input string (HH MM SS) to an int (HH:MM:SS)
 
I have to write a program that takes two different inputs (lets call them FirstTime & SecondTime) an...
[6 replies] Last: You could also use regular expressions <regex> for this, but given tha... (by TheToaster)
do while loop, invalid user inputs....
 
Hello, So I am trying to get this loop to take in values and check if they are within my requirem...
[3 replies] Last: @TheToaster, I knew i had to reset that and for whatever reason I was ... (by Dustin792)
C++ Joystick
 
Hello, im kinda new to C++, im making a game and want to use a controller for it, i made also bullet...
[1 reply] : I guess you start here https://www.sfml-dev.org/documentation/2.5.1/cl... (by salem c)
Classes, objects, points
 
Hello my friends I have a question that is very important for me i should write this : 1. Write...
[3 replies] Last: thank u @Handy_Andy i'll do (by closed account EwqDy60M)
Using an array to manipulate Pi to specific decimal Place
 
I have a class assignment where I have to take pi as a constant and set it to a user desired decimal...
[8 replies] Last: It sounds like you're expected to do floor(pi * 10^input) * 10^-input. (by helios)
How to implement classes
 
Hello, so i am very new to c++ and i have managed to create this code bellow. but i have to use clas...
[5 replies] Last: Hello jtek679, In addition to what dutch has already said. When yo... (by Handy Andy)
Cannot convert int to double
 
Hello, a beginner currently learning highest values. Been trying to find the highest amount of m...
[5 replies] Last: Thank you so much!! Both of you are lifesavers! (by starhan)
April 2020 Pages: 1... 89101112... 20
  Archived months: [mar2020] [may2020]

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