visual-c++visual-c++-2010

End1 not declared C++


When I try to build the solution for this program I am receiving the error End1 Not declared for all the end1 statements. Am I missing something?

#include "StdAfx.h
#include <iostream>

using namespace std;

const double PI = 3.14;

int main()
{


    double circumference;
    double radius;
    double area;


    cout << "Enter the radius: ";

    cin >> radius;
    cout << end1;

    circumference = 2 * PI * radius;

    cout << "Circumference = " << circumference << end1;

    area = PI * radius * radius;

    cout << "Area = " << area << end1;


    return 0;
}

Solution

  • Try replacing the number 1 with the letter l

    http://en.cppreference.com/w/cpp/io/manip/endl