View gist:fbe49ac7535e878fdf4db381ffe9cfb0
void DoEvents() { | |
MSG msg; | |
if(::PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { | |
::TranslateMessage(&msg); | |
::DispatchMessage(&msg); | |
} | |
} |
View gist:377a52851591b67a0b00151b99abe3f0
class Spawner { | |
STARTUPINFOA si; | |
PROCESS_INFORMATION pri; | |
bool wasOk; | |
string _name; | |
public: | |
Spawner(string name) { _name = name; wasOk = FALSE; } | |
void Activate(bool status) { |
View gist:2cada3631cccc079f8ec4c122c120afa
int toggleV1(int v1, int v2) { | |
static short n = 0; | |
if (n==0) { n=1; return v1;} | |
if (n==1) { n=0; return v2;} | |
return 0; | |
} | |
int toggleV2(int v1, int v2) { | |
static bool t = false; | |
t = !t; | |
return (t ? v1 : v2); |
View main_io.cpp
#include <stdio.h> | |
char line[1024]; | |
void operateOnFiles(FILE* fin, FILE* fout) { | |
printf("Files Ok..\n"); | |
while (!feof(fin)){ | |
fgets(line, 1024, fin); | |
printf("%s", line); // Start Here |