#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
void Func(int* x)
	{
		*x += 1;
	}
int main()
{
	int x = 0;
	Func(&x);
	Func(&x);
	Func(&x);
	printf("%d\n", x);
	system("pause");
	return 0;
}

每调用一次函数就增加1

相关文章: