Take a look at this code:
#include <iostream> using namespace std; #define foo bar #define string(a) #a #define concat(a,b) string(a ## b) #define concat2(a,b) concat(a,b) int main() { cout << concat(foo, baz) << '\n' << concat2(foo, baz) << endl; }
The output of this program:
foobaz barbaz
Why does adding an extra level of indirection change the behavior of this code?
No one has answered this question yet.
See similar questions:
or similar:
Source: https://habr.com/ru/post/1236555/More articles:Tmux Commands Not Working - tmuxVS2015 auto function not working - c #flink - adding tools - javaHow to read serialized data using python2 cPikle with python3 pickle? - pythonJavaScript: subtracting ranges of numbers - javascriptUWP reflects the selected CombBox item loaded from settings through binding - c #AWS IOT Struggling to get things shodow - amazon-web-servicesHow to display image created in backend using Django - pythonIncorrectly Configured in / Empty static prefix not allowed - Django - pythonThick border left and right - c #All Articles