Beginners - December 2014 (Page 32)

by jo0123
for loops
 
Can somebody show me how to do this with steps? not understanding it, i have a test tomorrow!! Determine the value in total after each of the following loops...
[2 replies] Last: From my understanding, I will try and show you how to do the first one... (by Torm04)
How can a friend class access the private members of another class?
 
When a class has declared another class as a friend, how can that friend class access the private members of the other class? I mean, I thought the function ...
[1 reply] : Yes, but of which food? Consider this usage: Food apple; Food beef; ... (by keskiverto)
Can you tell me what's wrong with this code?
 
Write your question here. thanks everyone my question has been answered :)
[2 replies] Last: Also, you have another problem. You're getting numbers that are not pr... (by deathslice)
implementation file
 
I don't have allot of experience I am just learning c++ unfortunately,I have an instructor who only likes to read from the book. I am not understanding what th...
[1 reply] : Implementation file (source file) is where the definitions of the func... (by Callum5042)
Sorting numbers while overloading the function.
 
So I've been trying to practice function overloading and I've come across a problem in displaying numbers that are not integers. The program compiles but I get ...
[3 replies] Last: Yes, you're right I should've said that it was just a warning. Anyways... (by deathslice)
Input from a file into an array?
 
Hello, I just have a quick question regarding functions, arrays, and reading from a file. So I'm wanting to create a function which takes input from a file ...
[3 replies] Last: Bump if it's allowed, still needing help (by lovestogame227)
reversing words
 
Hi Guys, I'm doing an online course in C++ (beginners) I've been tasked with reversing certain words in a string. I just wanted to ask your advice on w...
[6 replies] Last: Thanks alot for your help! :) (by badcoder)
by wolfv
How to initialize static variable in a loop?
 
I am attempting to automate the testing of Employee class (see code below). Each iteration of the loop is a new test case. Each iteration of the loop instantiat...
[9 replies] Last: Now I see what you mean. Thank you for explaining. Here is a simplifi... (by wolfv)
Adding two very large numbers
 
Hello there! I am writing a program that adds two VERY large numbers. I have my algorithm set up and everything, except that when I compile the program, it ...
[5 replies] Last: A little complex for my taste, but. . .to each his own :) In line 39 ... (by PCrumley48)
help please
 
The program i have come up with is giving me multiple errors, can someone help me fix it please.
[3 replies] Last: Kind of hard keeping track of where you are in this, trying to follow ... (by PCrumley48)
DisplayCards and DisplayESP Func.. Helppp
 
I know you guys must be sick of me by now lol SO this is what is happening I just ran it, got no matches at all. My out put is this: I guessed green ci...
[1 reply] : So i have declared this as a global std::string CARDS ={"nothing","... (by justinc978)
ugh ERROR!
 
#include <iostream> #include <string> using namespace std; string get_type() { const string C = "C47"; const string T = "T47"; string type; cout <<...
[3 replies] Last: Fix the indentation in your code and repost it. Hint: the return stat... (by LB)
HELP with Control Structures II (Repetition)
 
Having difficulty with this practice problem. Write a program that prompts a user for Input for the number of years the user has until retirement and the fix...
[1 reply] : What exactly are you struggling with? This program is input/output of ... (by LB)
Polymorphism Problem
 
I have this assign that requires polymorphism, but I have came to an agreement that I do not understand how to implement it. I read different explanations of it...
[1 reply] : Wait... I think I solved my own problem. I'm missing the default const... (by KrypticCliff)
Can't initialize static smart pointer
 
I have a class with a member being a static smart pointer to an object of a different class. Whenever I try to initialize the smart pointer, I always get an err...
[3 replies] Last: Because unique_ptr constructor, which takes pointer, is explicit a... (by MiiNiPaa)
Hospital Billing System using Classes
 
I'm not sure where I am going wrong. Of course the code is not complete but this is what I have thus far. The program is supposed to be a billing system (which ...
[14 replies] Last: Got a little busy but I will be testing this today.. I will post when ... (by dub1987)
Hangman Game Problem
 
Hello, I am making a hangman game where the user can enter a single letter guess or whole word guess. But when the user does a whole word guess and gets i...
[1 reply] : You can try something like this int main(){ string name; /// Create... (by Hp of Legend)
Loops converting underscores back to spaces
 
The assignment is to create a program to ask for a college name, and use underscores in place of the spaces. We must use a loop to convert underscores back to ...
[3 replies] Last: To start with , try understand how to access individual characters in ... (by closed account SECMoG1T)
A question regarding the swap ()
 
I am trying to input three parameters for the swap() since the book that I am currently is utilizing three parameters in the swap(). However, I am not sure how ...
[1 reply] : is the swap that takes 3 parameters a user-defined function that then ... (by mutexe)
by meifly
selection sort algorithm
 
it keeps saying that 'error expected initializer before 'void' how can i make it work? and how can i let it sort an array of 10 elements type integer? ...
[1 reply] : You need to implement main: int main() { int arr = { 4, 6, 1, 7 }; ... (by coder777)
December 2014 Pages: 1... 3031323334... 55
  Archived months: [nov2014] [jan2015]

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