error C2198: 'exit' : too few actual parameters

Python041

error C2198: 'exit' : too few actual parameters,第1张

C语言有默认的exit()函数,就在你的exit()里面还调用了一句exit(0),而你所编写的函数却没有参数,发生冲突,所以还是按照crab2313的建议,改个名吧。写函数名的时候一定要注意不要与系统关键字发生冲突

C的字符串拷贝函数strcpy(字符数组1,字符串2),strcpy_s()是自定义的吗,试一试strcpy。

#include "stdio.h"

#include "string.h"

main()

{

char str1[40] = "what are"

char str2[20] = "you doing?"

strcpy(str1, str2)

printf("%s \n",str1)

}

C2198是错误编号。

'delete_string' : too few actual parameters

Error executing cl.exe.

说是传给的参数少了。

原本delete_string函数不是两个参数吗,程序里写的delete_string(str)才给他传了一个参数,不够。