Beginners - October 2015 (Page 24)

C++ code
 
Write your question here. Can anyone help me solve this C++ code? I only know how to write the first triangle. Sample output: enter number and size of triang...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg218019 (by chicofeo)
by Andym
Class Inheritance
 
From what I have and read, a derived class can access all of the non-private members of its base class. My newest assignment works with class derivatives and o...
[8 replies] Last: As B::code is private, it is not visible to D. But D carries around B... (by Andym)
by eazye
Performing calculations on loaded arrays
 
Hello everyone, I've recently started a programming course and for my first assignment, I was asked to produce a code that would be able to extract up to 100 (...
[4 replies] Last: Hey thanks, I ended up using a vector and it turned out much simpler, ... (by eazye)
by wongd4
Batch Processing Incorrect Output
 
I have a file with the integers 17 24 3 247 -5 49 and the assignment is to read the numbers and determine if it's a prime number or not. The program's also supp...
[no replies]
by prgnub
classes, array of objects, member functions, instantiation. stuck on second input
 
Good afternoon, This is totally a homework question and I have the code written and it compiles and runs, but the console hangs when I input the second side. ...
[6 replies] Last: cire, you called it! Ran the code in xcode and it gave me a warning o... (by prgnub)
C++ using functions to deal with arrays?
 
Hi, I'm pretty new to C++ language and I have a question about this code as it has been driving me crazy. I have to use specific functions for an assignment, h...
[1 reply] : You told your compiler that populate_array returns an int , yet you... (by LB)
by C0UG3R
How to initialize a Queue (linked list) and insert an element?
 
I have an assignment where I have to create a linked list and add and remove items from it. I'm having a problem understanding how to initialize the linked list...
[no replies]
String, Multidimensional Arrays
 
Im doing a programme with a menu that allows the user to update the working hours of 10 people. im using Code blocks and am able to run the programme. However, ...
[5 replies] Last: I see. Thanks for the help! (by windeclipse)
if statements question help
 
I'm kinda stuck on how to write the if statement for the following situation: Let say this person played two games the first game if he gets a score less than...
[4 replies] Last: for the second one. Here is an example: if (game1score is higher tha... (by chicofeo)
Confusing Output for Values Array
 
I'm really confused by the output I'm getting for these two bits of code in Visual Studio. Please Note that the output I receive in visual Studio is completely ...
[2 replies] Last: Ah. Wow. I wasn't aware that there were optimization options available... (by Inquisitor01)
How to stop taking in input once "done" is typed
 
I was trying to write a code to find the average of the numbers entered by a user. I stored them in an array. The problem here is that I need to stop taking in ...
[1 reply] : http://en.cppreference.com/w/cpp/string/basic_string/stol (by MiiNiPaa)
Error in if Statement
 
I'm writing a program from my C++ class. Its called Software Sales. It wants me to write a program for a software company that sells a package that retails at $...
[3 replies] Last: I suggest you to use or and not instead of || && ! so your mistake... (by ne555)
Coding an Attack On Titan game... confused with polymorphism
 
So I would REALLY HATE to program this whole thing in order to find this isn't practical/doesn't work. Please bear with the laughable content of this code, a...
[no replies]
Issue with the for loop. I cant tell what the error is ?!
 
So I am trying to make a table that shows the car loans interest. However, I get confused that I do not know how to do it properly. Following is the prompt: Ca...
[no replies]
Issue with Function for a UNO Game;
 
Ok so I have this function that takes in a Stack of Cards pointer and a Deck reference. Prototype: void Update(Stack<Card>* _Discard, Deck& _Deck); ...
[no replies]
Help with this code
 
I have to create a library with the following functions. double dist (double x1, double y1, double x2, double y2); // Finds the distance between two points wi...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg218019 (by chicofeo)
End when Negative balance - Saving Account Balance
 
Hi, I am trying to do challenge exercise 5.16 "Savings Account Balance" from the book "Starting out with C++". I could do all but for the last part which is...
[no replies]
by TakeCP
Pyramid Code for Beginners
 
I wrote a code for the following output: 1 21 321 4321 54321 #include<iostream> using namespace std; void main () { int c,rows,i,i2,r=0...
[1 reply] : Is your program: 1) Not compiles     * Is other code compiles corr... (by MiiNiPaa)
I need help to solve all my problem Statement
 
Problem Statement Pantelis has won a voucher C euros from a hypermarket. With this money Pantelis can buy any two items from a list L items, whose total valu...
[2 replies] Last: am trying but i don't know how to check if two number are equal = with... (by Antria4)
avoid duplicates in groups of number 1-7
 
i some how manage to make a code but still it shows duplicates. for example 123 321 456 654 i want to make it work to avoid duplicates like possible gr...
[2 replies] Last: thank you for this. sorry im just starting learning C, thank you for t... (by tochivelez0)
October 2015 Pages: 1... 2223242526... 57
  Archived months: [sep2015] [nov2015]

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