ok...i'm working on the fallowing:
void getInfo (int getTnum, double& getAmt, int& getTtype, int& getTloc){
int trans;
ifstream TransNum;
TransNum.open("statement.txt");
TransNum >> trans >> getAmt >> getTtype >> getTloc;
while (trans!=getTnum){
TransNum >> trans >> getAmt >> getTtype >> getTloc;
}
TransNum.close();
return;
case 4:
int trans;
cout << "Enter transaction number: ";
cin >> trans;
getInfo(trans);
cout.precision(3);
cout << "Amount: $" << /*returned amount*/ << endl;
cout << "Type: " << printTransType(/*returhned amount*/) << endl;
cout << "Location: " << printTransLocation(returened-loc) << endl;
break;
am i doing the declarations for the references (thats what & is, right?) correctly? ex. funct (int& a)
do something with a...
but how do i call it in the menu function (the one with the case 4 switch)...
thanks
void getInfo (int getTnum, double& getAmt, int& getTtype, int& getTloc){
int trans;
ifstream TransNum;
TransNum.open("statement.txt");
TransNum >> trans >> getAmt >> getTtype >> getTloc;
while (trans!=getTnum){
TransNum >> trans >> getAmt >> getTtype >> getTloc;
}
TransNum.close();
return;
case 4:
int trans;
cout << "Enter transaction number: ";
cin >> trans;
getInfo(trans);
cout.precision(3);
cout << "Amount: $" << /*returned amount*/ << endl;
cout << "Type: " << printTransType(/*returhned amount*/) << endl;
cout << "Location: " << printTransLocation(returened-loc) << endl;
break;
am i doing the declarations for the references (thats what & is, right?) correctly? ex. funct (int& a)
do something with a...
but how do i call it in the menu function (the one with the case 4 switch)...
thanks
