Struct C++ array in function parameters not working at all -
Hello I have to do a program using an array of structures .. and I have to start it in a function. Below I am trying, but there is an error in my prototype "expected primary expression" .. I have followed the tutorials but I do not know what is doing wrong please help. I can not use pointers or vectors. Just thank you for the basic stuff your time.
struct gamecases {bool flag = false; Int cosmum; Double value; }; Int initialise (gameCases cases); // prototype
--- main ()
game cas case [26]; (Matter); // call
int initialize (gameCases cases) // definition {double values [26] = {.01, 1, 5, 10, 25, 50, 75, 100, 200, 300, 400, 500, 750, 1000, 5000, 10000, 25000, 50000, 75000, 100000, 200000, 300000, 400000, 500000, 1000000, 2000000}; For (int i = 0; i <26; i ++) {array [i]. Value = values [i]; }}
int initialize (gamecases case [26]) ; // Prototype Intralize (GameCase Case [26]) // Definition {Double Value [26] = {.01, 1, 5, 10, 25, 50, 75, 100, 200, 300, 400, 500, 750, 1000 , 5000, 10000, 25000, 50000, 75000, 100000, 200000, 300000, 400000, 500000, 1000000, 2000000}; For (int i = 0; i
and to call:
start (cases);
Comments
Post a Comment