What could be the error?
std::cout << (float)5/8 << std:endl;
error C2882: 'std': illegal use of namespace identifier in expression
What could be the error?
std::cout << (float)5/8 << std:endl;
error C2882: 'std': illegal use of namespace identifier in expression
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
Everything is very simple - I missed the second colon.
std::endl
can be std::endl
and often use "\n"
instead. Although the difference is only in two points - std::endl
more portable option and it drops the cout
's buffer. - gecubeIn general, it is best to include the std
at the beginning of the program:
using namespace std;
Source: https://ru.stackoverflow.com/questions/38870/
All Articles