int global = 0; int world = 0;
#ifndef GLOBAL_H #define GLOBAL_H extern int global; extern int world; #endif
#include "global.h" int main1() { set global = 1; //read the value "1" from one device; get world; // use world to do sth }
#include "global.h" int main2() { set world = 222; //read the value "222" from another device get global; //use global to do sth; }
main1
main2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)