How do I correctly use a pointer to function type? Im running a program thats shuffling numbers for me, and I defined my result, set the char string, set random_shuffle. And it says I need a pointer to function type, any help would be nice. :)
random_shuffle() returns void (in other words, nothing), so you can't send it to cout as you are on line 17. Use a for loop to print out the array instead.
Now that said, you have some other problems as well. That character array is well of 12 elements long. To show you, the first couple elements are: 'h' '1' ',' ' ' 'h' '2' and so on. So your random shuffle will only shuffle the first 13 elements.
Also, it seems you misunderstand what #define does. It simply replaces some text with some other text before the code is compiled. So you end up with a line 13 that says: int random_shuffle(&cards[0], &cards[12]);
And a line 17 that says: cout << random_shuffle(&cards[0], &cards[12]);
Neither of these are what you want.
Awesome, thanks man. I know what define does, I just thought Id try something out.. But it didnt work. =/ So, take out #define int result. And set a for loop. I'll do that and show you what it looks like, and if theres any errors.