   type modifiers problem
  getting this error during compile and don't really know why.  error C2065: 'Accumulator' : undeclared identifiererror C2373: 'Accumulator' : redefinition; different type modifiersi mean it is declared and i don't see whats wrong with the type.here are the functions, all of which are in main.cpp float Accumulator( const char theOperator, const float theOperand = 0){static float myAccumulator = 0; // initialised to 0 when program startsswitch (theOperator){case '+':myAccumulator = myAccumulator + theOperand;Tape(theOperator, theOperand);break;case '-':myAccumulator = myAccumulator - theOperand;Tape(theOperator, theOperand);break;case '*':myAccumulator = myAccumulator * theOperand;Tape(theOperator, theOperand);break;case '/':myAccumulator = myAccumulator / theOperand;break;case '@':myAccumulator = theOperand;Tape(theOperator, theOperand);break;case '=':cout << /*endl*/ myAccumulator << endl;break;case '?': // display the tapeTape(theOperator, theOperand);break;//case '.'://break;default:throwruntime_error("Error - Invalid Operator");}return myAccumulator;}   bool TestOK( const char theOperator, const float theOperand, const float theExpectedResult ){float Result = Accumulator(theOperator, theOperand);if (Result == theExpectedResult){cout << theOperator << theOperand << " . succeeded." << endl;return true;}else{cout << theOperator << theOperand << " .failed. " <<"Expected " << theExpectedResult << ", got " << Result << endl;return false;}}when i remove the TestOK function, it will say "undeclared identifier" on the next occurence of Accumulator().2nd Question.If u make an array to record scores and u delete the entire thing to remake the array to hold more.  Are u ment to see something like "|,5690000" on the number of scores uve entered so far when u view the entries AFTER uve remade the arrays? [edited by - ozzo on February 8, 2004 8:00:52 AM]
  1st question: Make sure that you have a function declaration or the function above the caller in the source file before you try to call it.void f();void g();void f(){ g(); /* do stuff */ }void g(){ /* do stuff */ }2nd question: Frankly, I don''t quite understand it. ;  "If u make an array to record scores and u delete the entire thing to remake the array to hold more. Are u ment to see something like "|,5690000" on the number of scores uve entered so far when u view the entries AFTER uve remade the arrays?"Either:a) use a vector and forget about it. think of it as an array they grows for you:std::vector scores;scores[0] = 7666;b) copy your old array into the new one BEFORE deleting it:int* tmp = new int[10000];memset(tmp, 0, sizeof(tmp));// make sure scores is smaller!memcpy(scores, tmp, sizeof(scores)); delete[] scores;scores = tmp;Obviously, option a is the easiest/safest. This is all out of my head, but it should be enough to give you an idea.