Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
代码示例一:
float i=1.1f; int j=static_cast<int>(i); cout << j<< endl;
代码示例二:
float i=1.1f; int j=(int)i; cout << j<< endl;
这些关于在 c++ 中转换的代码示例有什么区别?