阅读背景:

如何创建长度未定义的数组? (在C中)

来源:互联网 

I'm trying to create a program which randomly decides how many cards you have, then randomly allocates a value to each of those cards. I have managed to randomise the amount of cards, and I know how to randomise their values using an array and a for loop, but the problem is that this method only works when I manually choose a value for the number of elements in the array, but I want the number of elements to be the random amount of cards. How do I go about this? Here's my code so far to show what I mean. And yes, I'm aware the code probably could be done better but this is my first C assignment and I'm a complete beginner. Thanks :)I'm trying to create a program which randomly d




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: