20int main(
int argc,
char* argv[]) {
22 double highestGPA = NAN;
30 std::cout << std::fixed << std::showpoint;
31 std::cout << std::setprecision(2);
32 infile >> GPA >> name;
36 if (GPA > highestGPA) {
40 }
else if (GPA == highestGPA) {
43 infile >> GPA >> name;
45 std::cout <<
"Highest GPA: " << highestGPA << std::endl;
46 std::cout <<
"Students the highest GPA are: " << std::endl;
48 std::cout << stk.
top() << std::endl;
51 std::cout << std::endl;
for std::invalid_argument
bool isEmptyStack() const
void push(const value_type &item)
This class specifies the basic operation on a stack as a linked list.