#include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
string s = "2017";
for (char a = '0'; a <= '9'; a++) {
int cnt = 0;
for (char b : s) if (a == b) cnt++;
cout << a << ": " << cnt << endl;
}
return 0;
}
struct SomeShit {
int i;
float f;
char c;
SomeShit(int i, float f, char c) : i(i), f(f), c(c) {}
};
DWORD WINAPI Work(SomeShit* Parameter)
int i = Parameter->i;
float f = Parameter->f;
char c = Parameter->c;
delete Parameter;
....
}
CreateThread(NULL, 0, Work, new SomeShit(1, 3.14, 'a'), 0, NULL);