Language: C++

#include <iostream>
using namespace std;

bool isYes(char input[]);

int main()
{
	char Input[10000][101];
	int i=0;
	while(true){
		cin.getline(Input, sizeof(Input));
		yesno[i] = isYes(Input);
		if(Input[0] == '.') break;
		i++;
	}
	for(int j=0; j<i; j++){
		if(yesno[i]){
			cout << "yes" << endl;
		} else {
			cout << "no" << endl;
		}
	}
	return 0;
}

bool isYes(char Input[])
{
	int prep[50], prepnum=0, p=3;
	for(int i=0; Input[i]!='.'; i++){
		if(Input[i] == '('){
			if(p != 3){
				prep[prepnum] = p;
				prepnum++;
			}
			p=0;
		} else if(Input[i] == '['){
			if(p != 3){
				prep[prepnum] = p;
				prepnum++;
			}
			p=1;
		} else if(Input[i] == ')'){
			if(p!=0){
				return false;
			} else {
				if(prepnum==0) p=3;
				else {
					p = prep[prepnum-1];
					prepnum--;
				}
			}
		} else if(Input[i] == ']'){
			if(p!=1){
				return false;
			} else {
				if(prepnum==0) p=3;
				else {
					p = prep[prepnum-1];
					prepnum--;
				}
			}
		}
	}
	return true;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: no matching function for call to 'std::basic_istream<char>::getline(char [10000][101], long unsigned int)'
   11 |                 cin.getline(Input, sizeof(Input));
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  740 |     basic_istream<char>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
  520 |       getline(char_type* __s, streamsize __n)
      |       ^~~~~~~
/usr/include/c++/14/istream:520:26: note:   no known conversion for argument 1 from 'char [10000][101]' to 'std::basic_istream<char>::char_type*' {aka 'char*'}
  520 |       getline(char_type* __s, streamsize __n)
      |               ~~~~~~~~~~~^~~
a.cc:12:17: error: 'yesno' was not declared in this scope
   12 |                 yesno[i] = isYes(Input);
      |                 ^~~~~
a.cc:12:34: error: cannot convert 'char (*)[101]' to 'char*'
   12 |                 yesno[i] = isYes(Input);
      |                                  ^~~~~
      |                                  |
      |                                  char (*)[101]
a.cc:4:17: note:   initializing argument 1 of 'bool isYes(char*)'
    4 | bool isYes(char input[]);
      |            ~~~~~^~~~~~~
a.cc:13:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 if(Input[0] == '.') break;
      |                    ~~~~~~~~~^~~~~~
a.cc:17:20: error: 'yesno' was not declared in this scope
   17 |                 if(yesno[i]){
      |                    ^~~~~