Beginners - June 2015 (Page 25)

no instance of constructor "Employee::Employee" matches the argument list
 
class Hourly :public Employee { protected: double wage; double hours; string category; public: Hourly():Employee() { } ...
[2 replies] Last: 1. Please use code tags to make your code readable: http://www.cplus... (by MikeyBoy)
Pass by Reference vs. Pass by Pointers?
 
What is the difference between the following two codes? #include <iostream> using namespace std; void passReference (int &x); int main () { i...
[12 replies] Last: I hope im being clear here... I think you've got the gist. ;)... (by cire)
Error Message Regarding Char, Const Char, and String
 
When I try to compile this code, I get the following error message. I'm not exactly sure why. Any suggestions? Thank you in advance for any help! a.cpp: In fun...
[8 replies] Last: @keskiverto I tried to understand everything that you just said. Howe... (by jhykima)
Question Regarding Linked Lists
 
Hello, I am trying to understand linked lists. The following code is from a book. My question is, what does "EnemySpaceShip *getNewEnemy ()" mean? I underst...
[4 replies] Last: @anup30 I see. Thank you for your response. What book would you sugge... (by jhykima)
Simple calculator question
 
So i am trying to build this simple calculator that tells you if you have entered a wrong operator and that asks you if you want to do another calculation after...
[2 replies] Last: @mutexe thanks it works like a charm (by Kabal4eto)
Using arrays and struct variables
 
Hello! I am writing a program that should output to a file each student’s name followed by their test score and the relevant grade. The problem i am having i...
[3 replies] Last: Bummer! (by coder777)
2 .h 1 implentation and main. private variables
 
My instructor provided us with the main and the 2 .h had us make a .cpp file. The compiler keeps saying savings and checking was not declared in this scope...
[5 replies] Last: thank you, I realized right about the same time as the post :D (the ab... (by ncrawley)
how to translate EOF from C programing to C++
 
Please help me, I have search it on internet, but most of it I really don't understand. I just want to do end of file. In C programing way, you just type in w...
[2 replies] Last: http://www.cplusplus.com/reference/ios/ios/eof/ (by closed account 48T7M4Gy)
Keep getting no overload function takes 5 arguments
 
Write your question here. #include <iostream> #include <string> #include <stdlib.h> #include <iomanip> using namespace std; const double MIN_...
[1 reply] : class Salaried :public Employee { protected: int managementLev... (by alicialng)
CAN SOMEBODY HELP ME WITH THIS HW
 
Create a library with functions that convert between angles expressed in radians, degrees, and revolutions. Each function has a return type of double and an in...
[2 replies] Last: rad2deg takes one input (number of radians) and outputs the number of ... (by ats15)
by Winsu
Copy deep constructor with two pointer
 
I have been checking out why I have to do a deep copy constructor when my class has a pointer....until there It's fine...the trouble comes up when I have a clas...
[10 replies] Last: Why would you expect it to? The closing brace for operator+ is on lin... (by cire)
directx 9 programming
 
How do I load a direct x 9 mesh?
[5 replies] Last: I want to load a x mesh, with animation. (by MidnightTK)
Why do I need to use "cout" in order for my overloaded "<<" to work properly.
 
Hi everyone, I'm kinda confused what cout does that suddenly makes my overloaded "<<" function work. I'm going through my code line by line and testing it out. ...
[2 replies] Last: In your first function, please note that you are doing almost nothing.... (by S G H)
Why was my memory address correct when I returned an object byVal but not when I returned it byRef
 
Hi everyone, I'll show you the snippet of code that wasn't working. cout << "\tBackwards:"; for (it = l.rbegin(); it != l.rend(); --it) cout << ' ' << *i...
[5 replies] Last: @keane: Standard library code uses rbegin with reverse iterators. Usin... (by S G H)
by Aki12
How to split a string from an input file into 2 int values
 
I have this kind of input file Mo 13:30 16 Mo 8:15 35 Tu 7:50 20 We 17:45 30 Th 8:00 45 Su 23:50 30 ...
[3 replies] Last: Yes, sorry, that was a typo of mine. Glad to have helped. (by Duthomhas)
Pointer to Character Consant
 
Hello All, I am confused about how a pointer to a character constant works. Take the following as an example: char *pt = "Hello World!"; I t...
[2 replies] Last: [quote=cire]The address of the string literal is supplied and determin... (by Duthomhas)
by Feral
Password validation for school
 
I am only on my second course for C++ and I have an ok understanding on it. My code here is to validate a password to follow the criteria. I am having a problem...
[2 replies] Last: Thank you so much. This helps. It is working as intended. Time to hit ... (by Feral)
by makkz
Function to randomly place ships on an array
 
Hey guys I need some help with this function to randomly place ships of varying lengths (Battleships) on a 2D array. A carrier = 5 places Battleship = 4 places...
[18 replies] Last: What's so hard? Generate a random direction, generate a random row, g... (by AbstractionAnon)
by jgcart
Getting an error C2059
 
Write your question here. I was doing this for a homework problem for class and keep running into this error. Here was the problem: Write a program to ...
[4 replies] Last: Thanks, that actually helped. Noticed some other issues, but these are... (by jgcart)
Classes, Arrays and file reading
 
First time poster here =/ So let me begin by saying I'm a little embarrassed to be posting my code considering I have no idea what I am doing and I have sear...
[16 replies] Last: I thought this would change the numQuestions value and mess up the l... (by Codermik)
June 2015 Pages: 1... 2324252627... 32
  Archived months: [may2015] [jul2015]

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