1
0

Static cast test.

This commit is contained in:
Captain ALM 2022-08-15 00:18:23 +01:00
parent f3a5a7668a
commit 423e3e342b
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -1,13 +1,12 @@
#include <iostream> #include <iostream>
void print(int x)
{
std::cout << x;
}
int main() int main()
{ {
if(-1) print(static_cast<int>(5.5F));
std::cout << "-1 is true\n"; return 0;
if(2)
std::cout << "2 is true\n";
if(1)
std::cout << "1 is true\n";
if(!0)
std::cout << "0 is false\n";
} }