Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8659219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:57:39+00:00 2026-06-12T15:57:39+00:00

I have this piece of code: static char szTop[] = iMsg wParam lParam; static

  • 0

I have this piece of code:

static char szTop[] = "iMsg             wParam              lParam";
static char szUnd[] = "____             ______              ______";
static char szFormat[] = "%-16s%04X-%04X        %04X-%04X";
static char szBuffer[50];
static HWND hwndButton[NUM];

And it gives me error :

error C2143: syntax error : missing ']' before ';'
error C2143: syntax error : missing ';' before ']'

Another code is:

for(i=0;i<NUM;i++)
    hwndButton[i] = CreateWindow ( "button", button[i].text, WS_CHILD | WS_VISIBLE | button[i].style, cxChar, cyChar * (1+2*i), 20*cxChar, 7*cyChar/4, hwnd, (HMENU) i, ((LPCREATESTRUCT) lParam )->hInstance, NULL );
return 0;

And this gives me error:

error C2146: syntax error : missing ')' before identifier 'i'
error C2059: syntax error : ';'
error C2059: syntax error : ')'
error C2146: syntax error : missing ';' before identifier 'hwndButton

I have defined the required things previously as:

static char szTop[] = "iMsg     wParam              lParam";
static char szUnd[] = "____         ______      ______";
static char szFormat[] = "%-16s%04X-%04X        %04X-%04X";
static char szBuffer[50];
static HWND hwndButton[NUM];
static RECT rect;
static int cxChar,cyChar;
HDC hdc;
PAINTSTRUCT ps;
int i;
TEXTMETRIC tm;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:57:40+00:00Added an answer on June 12, 2026 at 3:57 pm

    For that first one, this can be caused by not having a definition in place for a type or macro, most likely HWND or NUM.

    For the second one, it’s complaining about the use of hwndButton before defining it, simply because of the first error – that variable was never defined because the statement that tried to define it had that earlier error error.

    First, verify that you have included the correct headers. I think it’s in windef.h but is usually included by the windows.h header file.

    Second, ensure that NUM is actually defined somewhere.

    I think it’s probably the NUM one simply because one of the errors comes from the for loop statement, where windows.h stuff is not used but NUM is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this piece of code: public static DateDialogFragment newInstance(Context context, DateDialogFragmentListener listener) {
I have this piece of code in c#: private static void _constructRow(SqlDataReader reader, system.IO.StreamWriter
I have a piece of code like this: Class Program { static StreamReader sr
This is the piece of code in base C: static bool is_ascii_value_of_digit(char ascii_value){ if((ascii_value<40)&&(ascii_value
I have written this piece of code public class Test{ public static void main(String[]
I have this C-styled piece of initialization code: const char * const vlc_args[] =
I have this piece of code: public static DateTime calcMondayDate(DateTime input) { int delta
I have this piece of code to make an asynchronous HTTP request: public static
I have this piece of LINQ code private static void Original() { using (var
I have this piece of code: class Test { public static void main (String[]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.