I'm trying to have the user input the size of the array. I use the scanf function to have the user input an integer and store that number to a variable "wishlist" and then use "wishlist" as the size of my array.
'''
//prompt user for input
scanf("%d", &wishlist);
double itemCost[wishlist];
int itemValue[wishlist];
'''
I keep getting the error message "expression must have constant value". Some other things I've tried is declaring the array before the scanf, after the scanf, even initializing the arrays with a value of {0}. Anything I've tried generates the same error message. Using an online IDE I've been able to do this just fine. But whenever I try and replicate it within Visual Studio for my assignment, it doesn't work. Any suggestions?