When {0}
is used to initialize an object, what does it mean? I can\'t find any references to {0}
anywhere, and because of the curly braces Google s
It's syntatic sugar to initialize your entire structure to empty/zero/null values.
Long version
SHELLEXECUTEINFO sexi;
sexi.cbSize = 0;
sexi.fMask = 0;
sexi.hwnd = NULL;
sexi.lpVerb = NULL;
sexi.lpFile = NULL;
sexi.lpParameters = NULL;
sexi.lpDirectory = NULL;
sexi.nShow = nShow;
sexi.hInstApp = 0;
sexi.lpIDList = NULL;
sexi.lpClass = NULL;
sexi.hkeyClass = 0;
sexi.dwHotKey = 0;
sexi.hMonitor = 0;
sexi.hProcess = 0;
Short version
SHELLEXECUTEINFO sexi = {0};
Wasn't that much easier?
It's also nice because: