I moved the external variables into main, but am stuck now on how to get my analyze_hand function to call correctly. Any input is appreciated.
nevermind. thank you
I moved the external variables into main, but am stuck now on how to get my analyze_hand function to call correctly. Any input is appreciated.
nevermind. thank you
Last edited by brillpsycho; 11-16-2012 at 05:35 PM.
The prototype doesn't match the implementation. If there are other issues, please explain them clearly so we know where to look.Code:// function prototype void analyze_hand(int[],int[]); // function call analyze_hand(num_in_rank,num_in_suit,&straight, &flush, &four, &three, &pairs); // function definition void analyze_hand(int num_in_rank[], int num_in_suit[],*straight, *flush, *four, *three,*pairs)
In C++ (not in C) you have an option to not set some arguments at the time function call provided that you declared default parameters.
7.7 — Default parameters « Learn C++
In your case, you have more parameters than you declared. So, your function decleration and call does not match. You must have compiler errors for the case
Please don't delete your code from the original post. Otherwise, other people won't be able to learn from the problems you faced.
I am here offering my time and abilities for no compensation, other than to help other people [such as yourself] improve their skills. By selfishly deleting your question, you've ensured that I was only able to help you with this question, not anyone else. That is rude, and makes people wary about offering you help in the future.