Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "| \" mean?

Tags:

c

In WINUSER.H, it defines WS_OVERLAPPEDWINDOW like this:

#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED     | \
                             WS_CAPTION        | \
                             WS_SYSMENU        | \
                             WS_THICKFRAME     | \
                             WS_MINIMIZEBOX    | \
                             WS_MAXIMIZEBOX)

What I don't understand is, rather than operator |, what does | \ do?

like image 940
Amumu Avatar asked Dec 02 '22 03:12

Amumu


1 Answers

\ as the LAST character of a line means "this line is not finished". It disappears from the preprocessed output.

Those lines are equivalent to:

#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | ...

just a bit more readable.

like image 85
Mat Avatar answered Dec 22 '22 19:12

Mat