help compiling this

Hi just wondering if anyone knows why this won't work?

The issue that I am having is with the end1; I am using Xcode on a mac and don't know how to fix it

#include <iostream> // no .h for stand library includes
int main()
{
std::cout << "Hello there\n";
std::cout << "Here is 5: " << 5<< "\n";
std::cout << "The manipulator std::end1 ";
std::cout << "writes a new line to the screen.";
std::cout << std::end1;
std::cout << "Here is a very big number:\t" << 70000;
std::cout << std::end1;
std::cout << "Here is the sum of 8 and 5:\t";
std::cout << 8+5 << std::end1;
std::cout << "Here is a fraction:\t\t";
std::cout << (float) 5/8 << std::end1;
std::cout << "And here is a big number:\t";
std::cout << (double) 7000 * 7000 << std::end1;
return 0;
}

THanks
Last edited on
Hi,

#include <iostream> // no .h for stand library includes

Cheers !:+)

Please always use code tags when you post :+)


http://www.cplusplus.com/articles/z13hAqkS/
Last edited on
closed account (E0p9LyTq)
The new line manipulator is std::endl, with a lower case L. Not a numeric 1.
Thank you very much FurryGuy
Topic archived. No new replies allowed.