+ 2
am I declaring an array wrong?
I'm using msvs 2015 and I'm getting error from this code; string mainPlayer[] = {name, money, exp, health};
3 odpowiedzi
+ 1
declar the elements in ""
+ 1
u r declaring strings in an array so be sure always to specify with ""
0
If you are using variables make sure they are all strings if not you shoud put every value between "". If this is program is going to be a game you shoud use classes and object because is more useful and you have a better control over your data.