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 862445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:08:37+00:00 2026-05-15T09:08:37+00:00

Every C++ books that I’ve read says something like this:- All C++ programs have

  • 0

Every C++ books that I’ve read says something like this:-

  1. All C++ programs have a main() function.
  2. main() function is the starting point for all C++ programs.
  3. All C++ programs begin its execution from the main() function.

However, I found that Windows programs written using MFC do not have any main() function. It use WinMain() function as the program starting point.

So can I say that Windows program written using MFC is not a C++ program? Then, what kind of program it is?

Thanks.

  • 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-15T09:08:38+00:00Added an answer on May 15, 2026 at 9:08 am

    The answer to this question is a little more complicated than yes or no. It depends largely, on how strict you make your definition of “C++ program”. A Windows subsystem program built with MSVC will not generally have a main function. MFC is a C++ language framework for building Windows subsystem programs (at least in contemporary practice). For the purposes of “Is a program written without a main function using a C++ compiler a C++ program, and if not, what is it?” MFC is irrelevant.

    The main function, can be talked about in terms of “freestanding” and “hosted” implementations. Only “hosted” implementations are required by the standard to have main as an entry point. That said, you’d be hard pressed to call Microsoft’s implementation of the CRT and the language “freestanding” with a straight face.

    So we could make the question more specific “Is an MFC application a conforming, hosted C++ program?” and the answer to that would be “Technically, very technically, no.”

    Re: freestanding vs. hosted:

    Any run of the mill C++ user land application is generally going to be hosted, that is have the benefit of the standard library et. al. Examples of freestanding scenarios might in an embedded system or an operating system kernel. For example when writing an OS kernel you can’t rely on the presence of functionality like malloc or new because you’re implementing the services (virtual memory, processes, etc.) that will ultimately used to implement things like malloc and new.

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

Sidebar

Related Questions

I have a website that lets users comment on books and articles, and the
I`m a little confused about this point. Everything that I found in books, blogs,
Assume that I have some HTML page, and a corresponding CSS file. I'd like
In a new piece of code I have several different classes that refer to
I have a table Classes, which stores data on different college classes (a unique
I saw in one of the jQuery books where you can highlight a column
I am using IIS to develop some web applications. I used to believe that
In learning WPF, I've been reading scads of books and web sites. One thing
Is it just me or can I not find a simple tutorial on accessing
I'm the programmatic guy, and I simply don't want to use Interface Builder. 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.