int nodeThread(node*parent, string cmd) { node*nd = masterRecord.registerNode(parent); if (nd == nullptr) { printf("Error: Node failed to register\n"); return -1; } printError(3000,"Hello world\n"); printf("Node [%u] created\n",nd->id); while (nd->active) { if (nd->usrInput && sysState.I_hndle==nd) { printf("%d >> ",nd->id); string input; getline(cin, input); interpret(input,nd); } } printf("Node [%u] destroyed\n", nd->id); masterRecord.deregisterNode(nd); return 0; }