Introduction
You have developed skills as a serious file-parsing fiend in project 1. Now, you will use those skills along with another class from the STL to hone your C++ abilities even more.
Academic Integrity Disclaimer
For this assignment, you are asked to work individually, no group work will be allowed for this assignment
Assignment
Matching Parenetheses
To the bane of most programmers (beginning or advanced), many languages require that parentheses must be matched before allowing a program to compile. Therefore, your assignment is to create a function called matching
that takes in a String that is a filename and reports back to the screen if the file contains matching parentheses. If the file does not contain matching parentheses, you need to state which parenthesis was not matched by giving the type of unmatched parenthesis.
Parentheses for this assignment include the standard ()
as well as {}
and []
and <>
.
You should make use of the stack in the STL for your solution.
In order to ensure that your function will be compatible with the testing program the TAs have created, please copy the file ~adrienne/250/HW2/matching.h
to your own directory and create a matching.cpp
so that it contains your solution. You can define as many additional functions as you would like in your matching.cpp
file. You will only be submitting the matching.cpp
file for this assignment.
Due dates
This homework is due for all students by 11:59:59pm on Friday, February 22nd using electronic submission. There is one submission command for the entire class
submit_cse250
You need to submit your file named matching.cpp
completed with your code.