I am new in C++. I am using g++ compiler. I was trying to learn operations of STL library in C++. While working I found some problem in this code. Please explain the reason of the error and how to take care the error.

```
#include<iostream>
#include<list>
using namespace std;

typedef struct corrd{
int x;
int y;
}XY;

int main()
{
list<XY> values;
list<XY>::iterator current;
XY data[10];
for(int i=0;i<10;i++)
{
    data[i].x = i+10;
    data[i].y = i+20;   
}
for(int i=0;i<10;i++)
{
    values.push_front(data[i]);
}
current = values.begin();
while(current!=values.end())
{
    cout<<"X coord:"<<*current->x<<endl;//error: invalid type argument of unary ‘*’ (have ‘int’
    cout<<"Y coord:"<<*current->y<<endl;//error: invalid type argument of unary ‘*’ (have ‘int’
    current++;
}
}

```