WIP
This commit is contained in:
11
tmp/main.c
11
tmp/main.c
@@ -1,11 +0,0 @@
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int tmp = 10;
|
||||
while (tmp != 0) {
|
||||
sleep(1);
|
||||
tmp--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
19
tmp/main.cpp
Normal file
19
tmp/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace {
|
||||
struct MyType {
|
||||
int data;
|
||||
};
|
||||
}
|
||||
|
||||
void helper_fn();
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
MyType tmp = MyType{10};
|
||||
while (tmp.data != 0) {
|
||||
helper_fn();
|
||||
tmp.data--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
13
tmp/sec.cpp
Normal file
13
tmp/sec.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <cstdint>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace test {
|
||||
struct MyType {
|
||||
int data;
|
||||
};
|
||||
}
|
||||
|
||||
void helper_fn() {
|
||||
test::MyType tmp = test::MyType{1};
|
||||
sleep(tmp.data);
|
||||
}
|
||||
Reference in New Issue
Block a user