Beginners - November 2015 (Page 23)

Average numbers
 
im stump right now. im looking in my book and i cant solve this program to do what is required this is what i have so far. "these are the requirements for the ...
[8 replies] Last: #include <iostream> #include <cmath> #include <iomanip> using namesp... (by CoolGuy)
by HG319
remove any node in a leftist heap
 
I am writing a code which should be able to remove any node in the leftist heap, not just the min. I have a parent, left, right pointers. For the node I want t...
[no replies]
Unable to pass by reference...
 
I can't pass by reference a private member via , my function... I try & but I get error. I tried making it a pointer but then I can't set it a value... #p...
[16 replies] Last: Oh my goodness thanks, I'm sorry about that sentence I must have been ... (by rabster)
Simple VECTOR usage, New to vectors
 
I am at the stage of storing my strings into a vector, could use some help Please. Also once i have my two lists of vectors is there a way to compare the two ...
[7 replies] Last: yeah i was doing it a crazy weird way, a better way was to use a peek ... (by nameishi)
by krappy
How to remove a class object from a vector of objects
 
Hello, I am having a issue here. Somehow I can't remove or erase an class object inside the vector of objects. To make it clear ill add some parts of my code. ...
[8 replies] Last: @cire it seems not working, or maybe i am doing it wrong i just copy p... (by krappy)
game
 
can anyone tell how to fix this program. my prblem is when iclick y in you want to play again the question/word repeat and when it reach the max of 10 you can n...
[2 replies] Last: can you clarify on your question please? This game runs Great (by jasonwynn10)
#include?
 
I am new to C++. What is meant by #include when we start writing C++ program?
[2 replies] Last: Don't duplicate posts please. It disrupts the communities way of helpi... (by jasonwynn10)
by medoo
missing data in my output file
 
Dear All , I have tried to write my output file as following But what I am getting is just last line of the data in the output file as I printed them in the s...
[1 reply] : ofstream runfile ("mppp.out" , std::ios::out ); runfile <<"Energy1"<<"... (by medoo)
Math Tutor c++ program, can't get the division part to function as it should
 
So I'm writing code for a math tutor program that has a selection menu and the user can addition, subtraction, multiplication, and division. I've gotten all but...
[4 replies] Last: can you show the entire code for us to help? (by jasonwynn10)
by amar27
craps game
 
hey there, i wrote this code for the craps game which gives just select its own numbers and chooses if the win or looses. but i want the main program to read ...
[4 replies] Last: Don't duplicate posts please. It disrupts the communities way of helpi... (by jasonwynn10)
How can I exit a for loop without the use of break?
 
Hi, I've written code to swap integers in multiple arrays and I was wondering is it possible to exit this for loop without the use of break and keeping the logi...
[2 replies] Last: Don't duplicate posts please. To answer your question, not that I know... (by jasonwynn10)
pseudo code for atm
 
Hello, I'm doing computing for a first time and got stuck on this task. I really need help. How should I write (simple) pseudo code using loop to check the en...
[1 reply] : How should I write (simple) pseudo code Write down what you think th... (by kevinkjt2000)
time between dates
 
I have this function (CalculateFare) that is suppose to calculate the cost of a few different things but will give a discount based on when you made the order. ...
[1 reply] : more specific to my question would be how could I jam in (int monSail,... (by AnOniOwesMe)
code skips second cin command
 
after line 14, the program just ends. It only happens with the exe file and visual studios but not on the cpp.sh website. #include <iostream> #include <...
[6 replies] Last: Works just fine for me. If the topic is resolved please mark it as res... (by jasonwynn10)
by Marth
My code is not clearing cin (please run it)
 
if you run this beuatafal prgom you will see that the entered name will not reset, so you run it once, it works, you choose yes at the prompt to re=run the prog...
[1 reply] : when a loop is run, getline is only run once, even if the loop is rest... (by jasonwynn10)
rand() only returns 41
 
I'm trying to use the rand function but for some reason it always returns 41. Any thoughts? #include <iostream> using namespace std; int main() {...
[3 replies] Last: #include <iostream> #include <ctime> #include <cstdlib> using namespa... (by jasonwynn10)
by rsood1
Basic Calculator Loop???
 
Hey, I am new to C++, I wanted to create a basic calculator and at the end of the program have a prompt which asks the user if they want to loop the program to ...
[2 replies] Last: #include <iostream> #include <cmath> #include <cstdlib> #include <iom... (by jasonwynn10)
unsafe conversion
 
which unsafe conversion is not accepted by the compiler? double to int? char to bool? bool to string? int to char? or double to bool
[1 reply] : depends on what compiler (by jasonwynn10)
Simple If Else statement is not working for some reason
 
So I have a task which i have to "calculate a monthly electricity bill, a standing charge of €20 is added to a charge of €0.05 per unit of electricity us...
[5 replies] Last: Haha the best of us make mistakes, thanks for the help guys. (by willmannix1)
Memory of a class
 
This is a silly question, but I'm genuinely curious and I'm not sure how I would test it. I know an integer takes 4 bytes. But how much more space is an object...
[2 replies] Last: Give a man a fish and he will eat for that day. Teach a man how to fis... (by keanedawg)
November 2015 Pages: 1... 2122232425... 53
  Archived months: [oct2015] [dec2015]

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