Skip to content

Commit e2bcff2

Browse files
committed
cast test
1 parent ef42c31 commit e2bcff2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

cpp/casttest.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main(){
4+
int a = 3;
5+
double d = 3.5;
6+
cout << int(d) << endl;
7+
cout << static_cast<int>(d);
8+
return 0;
9+
}

cpp/casttest.exe

55.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)