When you look at some code from a friend project, I recently saw a syntax similar to this one.
#include <iostream>
int main(){
std::cout<< int(32.5/5) << std::endl;
}
When you run the above code, you get 6what is the expected value if use intfunctions like a cast.
However, I had never seen this syntax before, and I could not find the documentation for it on the Internet. I also did an experiment and noticed that this syntax is not valid in C.
Can someone explain the meaning of this syntax with documentation links?
source
share