Language: C++

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

int main() {
  // ここにプログラムを追記
  int a;
  int b;
  int c;
  int flag;
  int i;
  int p;
  cin>>a>>b;
  c=a+b+2;
  string str;
  for(i=0;i<c;i++){
  cin>>str[i];
  }
  for(p=0;p<c;p++){
    if(p=a){
      if(str[p]=="-"){flag==1;}
    }else{
      unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
      flag==1;
      }
    }
  }
  if(flag==0){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |       if(str[p]=="-"){flag==1;}
a.cc:22:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:66: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:81: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:96: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:111: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:126: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:141: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:156: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
a.cc:22:7: error: 'unless' was not declared in this scope
   22 |       unless((str[p]=="0")||(str[p]=="1")||(str[p]=="2")||(str[p]=="3")||(str[p]=="4")||(str[p]=="5")||(str[p]=="6")||(str[p]=="7")||(str[p]=="8")||(str[p]=="9")){
      |       ^~~~~~