::操作全局变量

来源:互联网 发布:c语言md5加密代码 编辑:程序博客网 时间:2024/06/06 01:08
#include<iostream>#include <vector>#include <string>using namespace std;int value = 0;void printvalue(){cout << value << endl;}int main() {int value = 0; value = 1;cout << value << endl;::value = 2;printvalue();return 0;}//输出://1//2

0 0
原创粉丝点击