Language: C++

#include <iostream>
using namespace std;

class data{

public:
char name;
int win;
int lose;
int draw;

int score;

};

int main(){

int teamamo;

while(true){

cin>>teamamo;

if(teamamo==0)
break;

data teamdata[10];
data comp;

for(int i=0; i<teamamo; i++)
cin>>teamdata[i].name>>teamdata[i].win>>teamdata[i].lose>>teamdata[i].draw;

for(int i=0; i<teamamo; i++)
teamdata[i].score=teamdata[i].win*3+teamdata[i].draw;

for(int i=0; i<teamamo-1; i++){

if(teamdata[i].score<teamdata[i+1]){

char fout; 
fout=teamdata[i].name;
teamdata[i].name=teamdata[i+1].name;
teamdata[i+1].name=fout;

int gout;
gout=teamdata[i].win;
teamdata[i].win=teamdata[i+1].win;
teamdata[i+1].win=gout;

gout=teamdata[i].lose;
teamdata[i].lose=teamdata[i+1].lose;
teamdata[i+1].lose=gout;

gout=teamdata[i].draw;
teamdata[i].draw=teamdata[i+1].draw;
teamdata[i+1].draw=gout;

gout=teamdata[i].score;
teamdata[i].score=teamdata[i+1].score;
teamdata[i+1].score=gout;

    }


   }

for(int i=0; i<teamamo; i++)
cout<<teamdata[i].name<<','<<teamdata[i].score<<endl;


 }

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:1: error: reference to 'data' is ambiguous
   27 | data teamdata[10];
      | ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:4:7: note:                 'class data'
    4 | class data{
      |       ^~~~
a.cc:28:1: error: reference to 'data' is ambiguous
   28 | data comp;
      | ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:4:7: note:                 'class data'
    4 | class data{
      |       ^~~~
a.cc:31:6: error: 'teamdata' was not declared in this scope
   31 | cin>>teamdata[i].name>>teamdata[i].win>>teamdata[i].lose>>teamdata[i].draw;
      |      ^~~~~~~~
a.cc:34:1: error: 'teamdata' was not declared in this scope
   34 | teamdata[i].score=teamdata[i].win*3+teamdata[i].draw;
      | ^~~~~~~~
a.cc:38:4: error: 'teamdata' was not declared in this scope
   38 | if(teamdata[i].score<teamdata[i+1]){
      |    ^~~~~~~~
a.cc:68:7: error: 'teamdata' was not declared in this scope
   68 | cout<<teamdata[i].name<<','<<teamdata[i].score<<endl;
      |       ^~~~~~~~