Given a set of different types of paired symbols; determine whether it is balanced or not (the opening and closing version of each type are paired correctly). Any other type of characters may appear in the input will be neglected.
For example:
(**(*[*])****) is balanced, also [{}**[]**()]** is balanced. But ((*{*)*}) is unbalanced as well as [()***[]***{*(*)}.
Write a C++ program that requires a string containing and expression as an input from the user and check for balanced bracket pairs using stack data structure.
Here is my code witch give me nothing when I run it. can anyone please tell me what is wrong with this code?!!