mercredi 29 décembre 2021

Why this is showing error ? even tough it seems all syntax is correct?

I was writing a c++ code then encountered this error, how to resolve this ? enter image description here

#include<iostream>
using namespace std;
int main(){
    string str="([])[]({})";
    char a[10];
    int stk[10], total=0;
    for(int i=0; i<10; i++){
        a[i]=str[i];
        cout<<a[i];
        if(a[i]=="[" || a[i]=="{" || a[i]=="("){
            
        }
    }
}

Aucun commentaire:

Enregistrer un commentaire