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:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   20 |       if(str[p]="-"){flag==1;}
      |                 ^~~
      |                 |
      |                 const char*
a.cc:22:22: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                      ^~~
      |                      |
      |                      const char*
a.cc:22:36: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                    ^~~
      |                                    |
      |                                    const char*
a.cc:22:50: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                  ^~~
      |                                                  |
      |                                                  const char*
a.cc:22:64: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                ^~~
      |                                                                |
      |                                                                const char*
a.cc:22:78: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                              ^~~
      |                                                                              |
      |                                                                              const char*
a.cc:22:92: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                                            ^~~
      |                                                                                            |
      |                                                                                            const char*
a.cc:22:106: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                                                          ^~~
      |                                                                                                          |
      |                                                                                                          const char*
a.cc:22:120: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                                                                        ^~~
      |                                                                                                                        |
      |                                                                                                                        const char*
a.cc:22:134: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                                                                                      ^~~
      |                                                                                                                                      |
      |                                                                                                                                      const char*
a.cc:22:148: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-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")){
      |                                                                                                                                                    ^~~
      |                                                                                                                                                    |
      |                                                                                                                                                    const char*
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")){
      |       ^~~~~~