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

  • Home
  • SEARCH
  • 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 6982145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:14:58+00:00 2026-05-27T18:14:58+00:00

for some reason i get multiple errors once i include my own header file,

  • 0

for some reason i get multiple errors once i include my own header file, that has a simple class definition. Here is the code:

#define WIN32_LEAN_AND_MEAN 
#include "windows.h"
//#include "CInt.h"   <--- i get multiple errors once i activate this line

HINSTANCE       hInst;
HWND            wndHandle;

bool        initWindow(HINSTANCE hInstance);

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    if (!initWindow(hInstance)) return false;

    MSG msg;
    ZeroMemory(&msg, sizeof(msg));

    while(true)
    {
        while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }

        if(msg.message == WM_QUIT) break;
    }

    return msg.wParam;
}

bool initWindow(HINSTANCE hInstance )
{
    WNDCLASSEX wcex;

    wcex.cbSize             = sizeof(WNDCLASSEX);
    wcex.style              = CS_HREDRAW | CS_VREDRAW;
    wcex.lpfnWndProc        = WndProc;
    wcex.cbClsExtra         = 0;
    wcex.cbWndExtra         = 0;
    wcex.hInstance          = hInstance;
    wcex.hIcon              = LoadIcon(0, IDI_APPLICATION);
    wcex.hCursor            = LoadCursor(0, IDC_ARROW);
    wcex.hbrBackground      = static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
    wcex.lpszMenuName       = 0L;
    wcex.lpszClassName      = L"MOVEENGINE";
    wcex.hIconSm            = 0;

    RegisterClassEx(&wcex);

    wndHandle = CreateWindow(L"MOVEENGINE", L"MOVE ENGINE", WS_EX_TOPMOST | WS_POPUP | WS_VISIBLE, 0, 0, 1920, 1080, NULL, NULL, hInstance, NULL);

    if (!wndHandle) return false;

    ShowWindow(wndHandle, SW_SHOW);
    UpdateWindow(wndHandle);

    return true;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    int iVirtKey = static_cast<int>(wParam);

    switch (message)
    {
        case WM_KEYDOWN:
            switch(iVirtKey)
            {
                case VK_ESCAPE:
                    PostQuitMessage(0);
                    break;
            }
            return 0;

        case WM_DESTROY:
            PostQuitMessage(0);
            break;
    }

    return DefWindowProc(hWnd, message, wParam, lParam);
}

also code of the CInt.h:

class CInt
{
public:
    int k;

    CDirect3DDevice(int x):k(x){};
}

So what is wrong with my code? (I use Visual Studio 2010)

  • 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-05-27T18:14:58+00:00Added an answer on May 27, 2026 at 6:14 pm

    You are missing a semicolon after the class definition in your .h file.

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

Sidebar

Related Questions

For some reason I get some warnings about non dll-interface class when building with
for some reason I get this error below when trying to use multiple require()
For some reason I can't get gMap to display multiple maps on the same
For some strange reason, whenever I have a selector and expect to get multiple
For some reason if I try to get the actual size of mystruct I
For some reason I can't find a way to get the equivalents of sqlite's
For some reason, no matter how I go about it, I cannot get TortoiseSVN
I'm fairly new to JQuery and for some reason I can't get the currently
I know PHP 5 already supports SQLite but for some reason I can't get
I'm trying to get the extension of a filename, but for some reason I

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.