A function-like preprocessor macro. Modify the header file below to add a MAX macro that evaluates to the largest of its two arguments. #ifndef MACRO_H #define MACRO_H ...... Tester.cpp #include ...


A function-like preprocessor macro. Modify the header file below to add a MAX macro that evaluates to the largest of its two arguments.


#ifndef MACRO_H
#define MACRO_H


......


Tester.cpp


#include


#include


#include using namespace std;


#include "macro.h"


int main() {


string a{"frog"}, b{"dog"};


cout < max(1,="" 2)=""><>


cout < "expected:="" 2"=""><>


cout < max(a,="" b)=""><>


cout < "expected:="" frog"=""><>


cout < max(2.5,="" 1.5)=""><>


cout < "expected:="" 2.5"=""><>


cout < max(acos(-1.0),="" sin(7))=""><>


cout < "expected:="" 3.14159"="">< endl;="">



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here