I am a beginner in C++ programming and I am always having problems with compiling errors and what they actually mean so that I can fix it.
my current confusion is ;
: declaration of `length' shadows a parameter
what does shadows mean
I am a beginner in C++ programming and I am always having problems with compiling errors and what they actually mean so that I can fix it.
my current confusion is ;
: declaration of `length' shadows a parameter
what does shadows mean
Jessica
Show the code at the line where the error occurs please.
Use [ code] [/ code] tags around your code to make it easy to read.
Blue
I put asterisks where my shadows occur.
void getinfo(int& length, double& time, double& cost, double weekendrate, double eveningrate, double dayrate)
{
ifstream in;
in.open("/home1/c/a/acsi201/samples/phonedata");
int length;
** double time, cost, weekendrate = 0.15, eveningrate = 0.25, dayrate = 0.45;
Jessica
void getinfo(int& length, double& time...
** double time
That is your problem. You can't declare a double variable named time after you already declared a passed reference double named time....
Blue
Thanks I am learning this in school and the don't have a chapter on compiling errors in the book so I will be back to ask more questions when I can't figure it out for myself.
Jessica
We will be here... come back to help people with the stuff that you learn.
You are always welcome here... especially if you contribute.
Blue