std cout myArray (error)

Hi all, still practicing to work up to my program. :)

Why is this line not working I have the cout correct, is it the end?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

         int main()
         {
             int myArray[5];    //Array of 5 integers
             int i;
             for ( i=0; i=5; i++) //0.4
             {
                 std::cout << "Value for myArray[" << i << "]; ";
                 std::cin >> myArray[i];
             }
             for (i=0; i<5; i++)
                std::cout << i << ": " << myArray[i] << std::end1;
             return 0; 
         }


The line that has an error is towards the bottom.

std::cout << i << ": " << myArray[i] << std::end1;.

I think it's end1.
Firstly, how come line 7 says i=5 and line 12 says i<5 ? (or is it a typo?)
std::endl has L at the end. As in END Line.
What does the error message say, by the way?
Last edited on
That's how the practice wants me to do it.

It says;

End1 is not a member of std
Thats what hamsterman is saying. It is not 'end1' it is 'endl' and line 7 should be 'for(i=0;i<5;i++)'
Topic archived. No new replies allowed.