c++ - symbol endl and cout could not be resolved -
i have written code book reading complier warns symbol cout , endl not resolved. why that.
#include <iostream> #include <float.h> int main() { cout << "float: " << endl << "stevilo decimalnih mest: " << flt_dig << endl << "natancnost stevila....: " << flt_epsilon << endl << "najmanjse stevilo.....: " << flt_min << endl << "najvecje stevilo......: " << flt_max << endl << "bitov v mantisi.......: " << flt_mant_dig << endl << "najvecji eksponent....: " << flt_max_10_exp << endl << "najmlajsi eksponent...: " << flt_min_10_exp << endl; return 0; }
you have use namespace:
#include <iostream> #include <float.h> using namespace std;
or:
std::cout
you can read more namespaces in c++ here
Comments
Post a Comment