发布网友 发布时间:2022-04-24 13:56
共1个回答
热心网友 时间:2022-04-11 20:45
runtime error(access_violation)是运行时错误,非法访问内存,比如数组越界或者堆栈溢出。 看看题目要求: Input contains multiple test cases. Each test case starts with a number N ( 0 < N <= 1000 ) -- the total number of balloons distributed. The next N lines contain one color each. The color of a balloon is a string of up to 15 lower-case letters. A test case with N = 0 terminates the input and this test case is not to be processed. 而你的程序: a=(char **)malloc( 10 *sizeof(char *)); 用个超过10个的case就越界了。