Why doesn\'t the commented out line in the following program compile?
#include
#include
using namespace std;
#define F1(a) 1
in
A macro is not a function. It interprets your input vector
as 3 inputs, which are vector
,2
and 3}
. You can change this by making it an expression (vector
(as you already did).
Everything in parantheses is an expression and .vector
is a (*special member-)function so the preprocessor sees it as one expression