0_0_39255282_20094.cpp:5:275: error: empty character constant
5 | using namespace std; struct mystack{ char a[100010]; int t=0; void push(char x){ a[++t]=x; }char top(){ return a[t]; }void pop(){ t--; }int empty(){ return t==0?1:0; } }stk; int main(){ int n; cin>>n; getchar(); while(n--){ stack<char>s; while(1){ char ch=getchar(); if(ch!=''&&ch!='\n'&&ch!=EOF){ stk.push(ch); }else{ while(!stk.empty()){ cout<<stk.top(); stk.pop(); } if(ch=='')cout<<" "; }if(ch=='\n'||ch==EOF){ cout<<endl; break; } } } return 0; }
| ^~
0_0_39255282_20094.cpp:5:378: error: empty character constant
5 | using namespace std; struct mystack{ char a[100010]; int t=0; void push(char x){ a[++t]=x; }char top(){ return a[t]; }void pop(){ t--; }int empty(){ return t==0?1:0; } }stk; int main(){ int n; cin>>n; getchar(); while(n--){ stack<char>s; while(1){ char ch=getchar(); if(ch!=''&&ch!='\n'&&ch!=EOF){ stk.push(ch); }else{ while(!stk.empty()){ cout<<stk.top(); stk.pop(); } if(ch=='')cout<<" "; }if(ch=='\n'||ch==EOF){ cout<<endl; break; } } } return 0; }
| ^~
|