为什么传递参数无法更改。 我有一些功能传递参数无法编辑
void read_errorlog (int success, char *names, int empty) {
从另一个叫,其中
const char *names[2] = {"errorlog.txt","errorlog1.txt"}
int empty = 0;
int counter = 0;
int success = 0;
所有变量初始化。 void read_errorlog
的内部都不int success
,而不是int empty
更改那里值。 我这样做,就像empty = 0;
我打电话read_errorlog (one, two, three)
功能。我现在得到了,我必须传递int变量的地址。谢谢。
请写更多accuate示例代码,因为老实说,我不知道有什么问题。 – python 2014-09-19 16:05:17