Thank you Kurt! I believe that pointed me in the right direction. Now I'm not sure what is going on...
#include<iostream>
using namespace std;
int scoreCount = 0;
class ScoreBank { //...
Type: Posts; User: Kayoss
Thank you Kurt! I believe that pointed me in the right direction. Now I'm not sure what is going on...
#include<iostream>
using namespace std;
int scoreCount = 0;
class ScoreBank { //...
I've started a class ScoreBank that will take in test scores and (eventually) average them...but I can't seem to get past this error:
class ScoreBank { // base class ScoreBank
public:
...
These worked for me, thank you very much for your advice!
This code is from the Deitel book, but will only cout partway before issuing a debug error:
#include <iostream>
#include <string>
#include <iomanip>
#include <vector>
#include <typeinfo>
Thank you so much, I was pulling my hair out by this point! :D
This program will not cout anything...what am I missing?
#include <iostream>
#include <iomanip>
using namespace std;
class Point3
Using MSVC++ 6.0; this program compiles but will not build. Is it simply a compiler error, or is there something wrong with the code?
If someone could post a snippet of the results, I'd...
I'm trying to convert this simple phone number program into a demonstration of using the overloaded stream-insertion operator as a member function, i.e. I'm trying to use
phone << cout
instead...
Ah yes, I had curly braces instead of square brackets. My eyes must be going; thank you very much.
This program is taken straight from the Deitel book, figure 8.3. But I can't seem to get it to compile:
#include <iostream>
#include <iomanip>
using namespace std;
class PhoneNumber {
Both of my systems started giving me compiler errors when using namespace std;. After some research, I found this link which others may find helpful (if you are also getting the error):
...
Well ha! I tried that initially, but had a couple of them switched, so I wasn't getting the correct result. Thanks much for your time Kurt!
I'm working on this complex function to multiply two complex numbers. A and B are not in the scope of the overloaded function. How do I get the function to read them; do I have to make a separate...
Your code must be going around! :p Hmm, I'm using MS Visual C++ that came with the 4th Edition book.
This is a program that will process complex numbers (real and imaginary), but I'm getting an Internal Compiler Error:
#include <iostream>
using namespace std;
class Complex
{
double...
Oops, here is an example, since we haven't covered <string> just yet:
#include <iostream>
#include <ctime> // for time
#include <cstring> // for strings
using namespace std;
Another question - is it possible to use strcpy to copy Date h into a string? I'm getting conversion errors ie "cannot convert parameter from class Date to char *"
strcpy ( timeToConvert,...
Great link, thanks a lot!
Okay, this simple program works just fine:
#include <iostrem>
#include <ctime>
using namespace std;
int main()
{
I started by using C++ How to Program (Fourth Ed) in class, then later picked up C++ for Dummies. The Dummies is great for reference; however I find it too basic. The How to Program text is too...
Thank you so much, yes it works! Glad to see it was simple. :)
This date program is supposed to take in the written date
Date g( January, 12, 1994 ); // written date
and convert it, displaying it as 01/12/94 and 12/1994 (ordinal, or as some call it,...
Funny, Chaos! Thank you everyone for your responses.
Ack, I'm trying to edit my post, but it's the
Date::Date
function, not the smily.
This is a long program to sift through, but I am getting the following error:
"Ambiguous call to overloaded function" Date::Date
see the asterisks **** for the error location
The program will...