code_junkie

What Does {0} Mean in C?

Nov 10th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. SHELLEXECUTEINFO sexi = {0};
  2. sexi.cbSize = sizeof(SHELLEXECUTEINFO);
  3. sexi.hwnd = NULL;
  4. sexi.fMask = SEE_MASK_NOCLOSEPROCESS;
  5. sexi.lpFile = lpFile.c_str();
  6. sexi.lpParameters = args;
  7. sexi.nShow = nShow;
  8.  
  9. if(ShellExecuteEx(&sexi))
  10. {
  11. DWORD wait = WaitForSingleObject(sexi.hProcess, INFINITE);
  12. if(wait == WAIT_OBJECT_0)
  13. GetExitCodeProcess(sexi.hProcess, &returnCode);
  14. }
  15.  
  16. struct S { int a; char* b; int c; };
  17. S ss = { 1, "asdf" };
  18.  
  19. struct foo
  20. {
  21. char c;
  22. int i;
  23. };
  24.  
  25. foo a = {0};
  26.  
  27. foo a;
  28. memset(&a,0,sizeof(a));
  29.  
  30. SHELLEXECUTEINFO sexi = {};
  31. char mytext[100] = {};
  32.  
  33. char mytext[100] = {0};
  34.  
  35. SHELLEXECUTEINFO sexi = {0};
  36.  
  37. int i = {0};
  38. double l = {-1.0};
Add Comment
Please, Sign In to add comment