This commit is contained in:
parent
0ae5f80f36
commit
e78201ea5d
43
.drone.yml
43
.drone.yml
@ -1,19 +1,24 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
steps:
|
||||
- name: test
|
||||
image: gcc:latest
|
||||
commands:
|
||||
- g++ hello.cpp -o hello && ./hello
|
||||
|
||||
- cd class || exit
|
||||
- g++ construct.cpp -o construct && ./construct
|
||||
- g++ inherit.cpp -o inherit && ./inherit
|
||||
- cd ..
|
||||
|
||||
- cd stl || exit
|
||||
- g++ map.cpp -o map && ./map
|
||||
- cd ..
|
||||
|
||||
- cd interview || exit
|
||||
- g++ memcache.cpp -o memcache && ./memcache
|
||||
kind: pipeline
|
||||
name: default
|
||||
steps:
|
||||
- name: test
|
||||
image: gcc:latest
|
||||
commands:
|
||||
- g++ hello.cpp -o hello && ./hello
|
||||
|
||||
- cd class || exit
|
||||
- g++ construct.cpp -o construct && ./construct
|
||||
- g++ inherit.cpp -o inherit && ./inherit
|
||||
- cd -
|
||||
|
||||
- cd stl || exit
|
||||
- g++ map.cpp -o map && ./map
|
||||
- cd -
|
||||
|
||||
- cd interview || exit
|
||||
- g++ memcache.cpp -o memcache && ./memcache
|
||||
- cd -
|
||||
|
||||
- cd misc || exit
|
||||
- g++ sizeof.cpp -o sizeof && ./sizeof
|
||||
- cd -
|
14
misc/sizeof.cpp
Normal file
14
misc/sizeof.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
char strs[2][1024];
|
||||
|
||||
int main()
|
||||
{
|
||||
cout << sizeof(strs) << endl;
|
||||
cout << sizeof(strs[0]) << endl;
|
||||
cout << sizeof(strs[0][0]) << endl;
|
||||
for (size_t i = 0; i < sizeof(strs) / sizeof(strs[0]); i++)
|
||||
cout << sizeof(strs[i]) << endl;
|
||||
}
|
Loading…
Reference in New Issue
Block a user