Help with program that doesn’t work. This is the program towrite – C++ Write a program that prompts for a file name and thenreads the file to check for balanced curly braces, {; parentheses,(); and square brackets, []. Use a stack to store the most recentunmatched left symbol. The program should ignore any character thatis not a parenthesis, curly brace, or square bracket. Note thatproper nesting is required. For instance, [a(b]c) is invalid.Display the line number the error occurred on.
Issue is that i get STACK OVERFLOW INVALID FILE whenever i searchfor the file.
Stack.h file
#include<iostream>
using namespace std;
//declare the top
static int top
OR
OR