Beginners - November 2015 (Page 19)

access base class varibale in derived class
 
I have base class member variable which has private access. But I need to access the variable in derived class without changing the access type of the base c...
[2 replies] Last: You have a design failure. Why must you do this? (by Duthomhas)
How to display Even numbers?
 
Can Anyone in here can help me? Just a basic program for you but not for me. I need to display even numbers, limited by the user. If the user inputted 1-10, it...
[3 replies] Last: ...okay, but that doesn't accept input in the manner indicated by your... (by Duthomhas)
by YesU
Need a little bit of help :)
 
Hello, guys :) I get that kind of question: Read from file all the numbers below, first row shows how much formulas you have ( must be show in program), afte...
[1 reply] : There's a tutorial on files here (which probably tells you more than y... (by Chervil)
Please HELP!! hollow square with diagonals
 
I do not know how to get the hollow square with diagonals in the middle can someone please help. ***** // <-- this is how it needs to look like ...
[1 reply] : #include <iostream> using namespace std; int main() { int squar... (by closed account 48T7M4Gy)
delete vectors element through iterator
 
std::vector<int*> vPtr; int* ptr1 = new int(1); std::vector<int*>::iterator iter = vPtr.begin(); how do i delete the vPtr through iterator? ...
[1 reply] : With the member function erase(...): http://www.cplusplus.com/referen... (by coder777)
by mhurt
Newbie not sure what they are asking for.
 
Hello, Newbie here. Ive been assigned a piece of code to design that I dont know exactly what they are asking for. They are asking me to produce a matrix of 0'...
[9 replies] Last: A good RNG is. Rand is not a very good RNG, particularly in the low bi... (by Duthomhas)
Class problem?
 
Trying to make this run time array automatic, yet it's not really working within my constructor? #include <iostream> using namespace std; struct bob...
[14 replies] Last: Ah. It's good to mess around to figure out how stuff works. (by Duthomhas)
Linked list problem
 
Hi I have an assignment that asks me to create a linked list and populate it with integers 0 to 10. I have done that already. The problem I'm having is with the...
[1 reply] : Move lines 6 to 10 above line 4. (by coder777)
Driver Program??
 
Write your question here. I created this code according to what the question asked me to do. But I am confused on the last part of the question. Problem: Mod...
[no replies]
Can't generate student id
 
Ladies and gents, I'm working on a simple database, and I'm trying to make it so that a student id is generated and then not approved till unique when adding...
[1 reply] : You need to initialize i on line 17. (by TwilightSpectre)
Math is wrong
 
So our problem is: Read in five scores and output the average; then, for each score, output the amount by which that score differs from the average. For e...
[3 replies] Last: Wow...can't believe i didn't see that. Thanks! (by ianheinze)
VS2015 killing command prompt when using Debugger
 
Okay when using VS2015 on Windows 10 I open a Win32 Consol Application then type the following below as befits a newbies first program #include "stdafx.h" #inc...
[3 replies] Last: "Start without Debugging" just runs the program; it does not close the... (by JLBorges)
Quick question about pointers
 
Im reading an input file that has the following co-ordinates 2.5 1.5 -1.5 1.5 2.0 3.0 I need to come up with new coordinates and print them in an out fi...
[1 reply] : Hi, ..... how do I write the function so that I would get 3 new co-o... (by TheIdeasMan)
by cspace
l-value/r-value references and storage
 
I understand that compilers can optimize references out of existence so that they don't "occupy storage" (http://en.cppreference.com/w/cpp/language/reference )....
[4 replies] Last: Thanks for the correct syntax and explanations. Earlier I had just gi... (by cspace)
by Mays
Loop question
 
Hi! I'm a complete beginner and have been learning C++ for a mounth or so via an internet course. It has been going fine untill we came to looping and got an ...
[6 replies] Last: :O) Nothing is obvious. (by Duthomhas)
Error with 2D Array and Void Function
 
Thanks Chervil! Managed to figure out the issue. Deleted code for safety measure.
[5 replies] Last: Deleted code for safety measure. No. Don't do that. When you do t... (by MikeyBoy)
Divion of integer versus multiplication with reciprocal
 
Hi, I am trying to do an easy division on an integer, trying to assign the value to a double and I assume this is wrong. However, all other operation, such as ...
[1 reply] : Try dividing by 10.0 (type double) rather than 10 (type int). (by Chervil)
MATRIX
 
no info yet
[1 reply] : Well done. Keep up the good work. It's always good news when people ha... (by closed account 48T7M4Gy)
by c2plus
How to make overload operator << for person.cc?
 
I have constructed the person.cc and I have to appropriately overload operator<< so that I can print any type of person. The format to be used is: <person S sur...
[3 replies] Last: The operator must be a friend of the Person class (see my note on line... (by AbstractionAnon)
MATRIX
 
still working on it
[1 reply] : What is the problem? (by closed account 48T7M4Gy)
November 2015 Pages: 1... 1718192021... 53
  Archived months: [oct2015] [dec2015]

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