Jan 20, 2017 at 8:30pm
It will give you the name as a string.
RegisterTcpFlow(hello)
will expand to RegisterFlow("hello", &hello::Construct, eTcp);
Jan 20, 2017 at 10:04pm
Thank you for reply. So it means it will convert hello as a variable to a string which is the variable name. Correct ?
Jan 21, 2017 at 10:42am
You can pass almost anything as argument to a macro, not just variables.
1 2 3 4 5 6 7 8
|
#include <iostream>
#define STR(str) #str
int main()
{
std::cout << STR(This will be turned into a string.\n\t123...);
}
|
This will be turned into a string.
123... |
Last edited on Jan 21, 2017 at 11:10am