0

[Solved]I really need a little bit explain on parameter for function (Please HELP meTwT)

Can someone help me explain why While(StockSelect(stocknum)) need to have 'stocknum' in the parameter of the function 'StockSelect' as it didn't get any input value yet or is there any reasons for doing this? #My teacher show me this example code for my project #Thanks for your answer int main() { int stocknum; while(StockSelect(stocknum)) { int inqchoice = ShowStockMenu(); switch(inqchoice) { case 1: PriceDataInquiry(stocknum); break; case 2: GainLossCalculation(stocknum); break; default: cerr<<"Invalid inquiry choice!"<<endl; exit(EXIT_FAILURE); } } return 0; }

6th Oct 2019, 12:01 PM
Yourint
Yourint - avatar
5 Answers
+ 1
~ swim ~ That's what I needed! Thank you!
7th Oct 2019, 3:07 AM
Yourint
Yourint - avatar
+ 1
Martin Taylor Thank you I will go read some more:3
7th Oct 2019, 3:08 AM
Yourint
Yourint - avatar