Note that there are some explanatory texts on larger screens.

plurals
  1. POExpected identifier or something?
    primarykey
    data
    text
    <p>I have typed code posted below in DEV C++, which is an updated version, the Orwell one. It gave me some errors and I would like you to help me with them :) Most of the errors are already been fixed by me, but some of them I just cant explain. I am just trying to do simple MS app program.</p> <p>Compiler gives me this error:</p> <blockquote> <p><strong>LINE 53</strong> <em>[Error] expected identifier or '(' before '{' token</em></p> </blockquote> <p>The code:</p> <pre><code># include &lt;windows.h&gt; LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); int WinMain (HINSTANCE hinstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppName[] = TEXT ("HelloWin"); HWND hwnd; MSG msg; WNDCLASS wndclass; wndclass.style = CS_HREDRAW| CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hinstance; wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szAppName; if (!RegisterClass (&amp;wndclass)) { MessageBox (NULL, TEXT ("XXCXCXCXCX"), szAppName, MB_ICONERROR); return (0); } hwnd = CreateWindow (szAppName, TEXT("FRFRFRFRF"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hinstance, NULL); ShowWindow (hwnd, iCmdShow); UpdateWindow (hwnd); while (GetMessage (&amp;msg, NULL, 0, 0)) { TranslateMessage (&amp; msg); DispatchMessage (&amp; msg); } /* END while*/ return (msg.wParam); } /* END WinMain () */ LRESULT CALLBACK WndProc(HWND, UINT message, WPARAM wParam, LPARAM lparam); { ("**this is line 53**") HDC hdc; PAINTSTRUCT ps; RECT rect; switch (message) { case WM_CREATE: PlaySound("FRFRFRZZZZZ.wav"), NULL, SND_FILENAME|SND-ASIAC return (0); case WM_PAINT: hdc = BeginPaint (hwnd, &amp;ps); GetClientRect (hwnd, &amp;rect); DrawText (hdc, TEXT ("HZHZHZHZ!"), -1, &amp;, DT_SINGLELINE|DT-CENTER|DT_VCENT; EndPoint (hwnd, &amp;ps); return (0); case WM_DESTROY; PostQuitMessage (0); return (0); } return (DefWindowProc (hwnd, message, wParam, lParam)); } </code></pre> <p>Happy new year, and it's the rest of the code okay?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload