离大谱了简直是。
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <string.h>
using namespace std;
struct modxy
{
int x;
int y;
};
char a[1000][1000];
int n,m;
modxy head,tail,right,left;
bool flag=false;
int main()
{
scanf ("%d %d", &n, &m);
for (int i=1;i<=n;i++)
{
for (int j=1;j<=m;j++)
{
cin>>a[i][j];
}
}
for (int i=1;i<=m;i++)
{
for (int j=1;j<=n;j++)
{
if (flag==false&&a[i][j]=='*')
{
left.x = i;
}
}
}
}
left.x = i;报错:
error: reference to 'left' is ambiguous
34 | left.x = i;