Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b,c;
    string N; 
    cin >> N; 
    for(int i=0; i < N.size() ;++i){
       if(N.at(i) == "A"){
        a=N.size(i);　　　　　
       }
       else if(N.at(i)=="Z"){
        b =N.size(i);
           for(int j=N.size(i+1);j<N.size();++j){
              if(N.at(j)=="Z"){
                  b=N.size(j);
              else{
                  break;
              }
              } 
           }
        }

       c=b-a; 
    }
    cout << c <<endl;
}

Compiler output:
a.cc:10:21: error: extended character 　 is not valid in an identifier
   10 |         a=N.size(i);　　　　　
      |                     ^
a.cc:10:21: error: extended character 　 is not valid in an identifier
a.cc:10:21: error: extended character 　 is not valid in an identifier
a.cc:10:21: error: extended character 　 is not valid in an identifier
a.cc:10:21: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |        if(N.at(i) == "A"){
      |           ~~~~~~~~^~~~~~
a.cc:10:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
   10 |         a=N.size(i);　　　　　
      |           ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:10:21: error: '\U00003000\U00003000\U00003000\U00003000\U00003000' was not declared in this scope
   10 |         a=N.size(i);　　　　　
      |                     ^~~~~~~~~~
a.cc:12:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |        else if(N.at(i)=="Z"){
      |                ~~~~~~~^~~~~
a.cc:13:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
   13 |         b =N.size(i);
      |            ~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:14:28: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int)'
   14 |            for(int j=N.size(i+1);j<N.size();++j){
      |                      ~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:15:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |               if(N.at(j)=="Z"){
      |                  ~~~~~~~^~~~~
a.cc:16:27: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
   16 |                   b=N.size(j);
      |                     ~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:17:15: error: expected '}' before 'else'
   17 |               else{
      |               ^~~~
a.cc:15:31: note: to match this '{'
   15 |               if(N.at(j)=="Z"){
      |                               ^
a.cc: At global scope:
a.cc:26:5: error: 'cout' does not name a type
   26 |     cout << c <<endl;
      |     ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^