Where is main?

A

Allen Maki

I am new to form and controls. I do C++ programming for more than 10 years.
I noticed that there is no main function. Can anybody explain what I am
missing.

I am sure there is some kind of philosophy out there



I would be pleased if you could tell me where I can find more information
about the subject.
 
J

Jon Skeet [C# MVP]

Allen Maki said:
I am new to form and controls. I do C++ programming for more than 10 years.
I noticed that there is no main function. Can anybody explain what I am
missing.

I am sure there is some kind of philosophy out there

I would be pleased if you could tell me where I can find more information
about the subject.

It would help if you'd say which language you're using. I *believe*
(though I'm far from a VB.NET expert and would welcome correction) that
VB.NET can "hide" the Main method. In C# it's always visible.
 
P

PvdG42

Allen Maki said:
I am new to form and controls. I do C++ programming for more than 10
years. I noticed that there is no main function. Can anybody explain what
I am missing.

I am sure there is some kind of philosophy out there



I would be pleased if you could tell me where I can find more information
about the subject.
To add to what John told you, in a C++/CLI Windows Forms project, you'll
find main() in the <ProjectName>.cpp file, whereas your event procedures
will be placed in the <FormName>.h file.
 
A

Allen Maki

Hi John,

I am sorry. I still use C++ in general and V C++ .NET, in particular.

Thanks.
 
A

Allen Maki

Hi PvdG42,
Thanks for answering my question. You made a good point. In V C++ .net
compiler that I am using, the source file of the form is almost empty, but
the handler is in the bottom of the class block of the form header file.
 
A

Allen Maki

Hi PvdG42,

Is me again.

Thinking more about what you have told me; I do not have <project Name>.cpp
or <ProjectName>.h files, but I do have <FormName>.cpp and <FormNme>.h
 
P

PvdG42

Allen Maki said:
Hi PvdG42,

Is me again.

Thinking more about what you have told me; I do not have <project
Name>.cpp
or <ProjectName>.h files, but I do have <FormName>.cpp and <FormNme>.h
In Solution Explorer, click the toolbar button "Show All Files" and you
should then see your <ProjectName>.cpp file under Source Files. It's
generated automatically for each C++ WinForms project.
 
A

Allen Maki

Hi PvdG42,
I am sure I have no ProjectName.cpp. Each form has its own source file. I
found extra two source files:

stdafx.cpp, and
assemblyInfo.cpp

remember I am using V C++ .NET compiler

Thanks again for your help
 
P

PvdG42

Allen Maki said:
Hi PvdG42,
I am sure I have no ProjectName.cpp. Each form has its own source file.
I found extra two source files:

stdafx.cpp, and
assemblyInfo.cpp

remember I am using V C++ .NET compiler

Thanks again for your help
So, you're not using Visual Studio 2005?
If not, my comments on the location of main() don't apply.
Sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top