Language: C++

#include <iostream>
#include <string>
using namespace std;
bool in(char s){
  if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
    return true;
}
int main(){
  int a,b;
  string s;
  cin >> a >> b >> s;
  for(int i=0;i<a+b+1;i++)
    if(i!=a){
      if(!in(s[i]){
         cout << "No" << endl;
         return 0;
      }
    }
    else
      if(s[i]!='-'){
         cout << "No" << endl;
         return 0;
      }
   cout << "yes" << endl;
}

Compiler output:
a.cc: In function 'bool in(char)':
a.cc:5:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |      ~^~~~~
a.cc:5:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                ~^~~~~
a.cc:5:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                          ~^~~~~
a.cc:5:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                    ~^~~~~
a.cc:5:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                              ~^~~~~
a.cc:5:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                                        ~^~~~~
a.cc:5:67: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                                                  ~^~~~~
a.cc:5:77: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                                                            ~^~~~~
a.cc:5:87: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                                                                      ~^~~~~
a.cc:5:97: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=="1" || s=="2" || s=="3" || s=="4" || s=="5" || s=="6" || s=="7" || s=="8" || s=="9" || s=="0")
      |                                                                                                ~^~~~~
a.cc: In function 'int main()':
a.cc:14:19: error: expected ')' before '{' token
   14 |       if(!in(s[i]){
      |         ~         ^
      |                   )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
a.cc: In function 'bool in(char)':
a.cc:7:1: warning: control reaches end of non-void function [-Wreturn-type]
    7 | }
      | ^