Function like Macros





This video tutorial explains the function like macros in c++.
You are gonna learn how to pass parameters to macros, how to define function like macros, how to use defined macros in your program in detail with example.

source code for this tutorial

#include <iostream>

#define ABS(number,num) ((number) <(num) ? (num) : (number))

using namespace std;

int main()
{
  cout << ABS(4,2);
  return 0;
}

 
Back To Top