Which template should I use for classes

  • Thread starter Thread starter Juliano.net
  • Start date Start date
J

Juliano.net

I'm developing a program that I want to be Object Oriented, so I've
opened the Add New File dialog, and there I found "Component Class" and
"Installer Class", which of them should I use to create the classes for
my program logic?
 
Juliano.net said:
I'm developing a program that I want to be Object Oriented, so I've
opened the Add New File dialog, and there I found "Component Class" and
"Installer Class", which of them should I use to create the classes for
my program logic?

none of those for a simple class.
select 'add class' then select the C++ tab and add a C++ class. you can
choose between Managed (.NET) and plain C++.
that will generate the header and source files for your class.

if you are using 'add new file' you can add a new header file and cpp file
and then create the class declaration and implementation yourself, but the
end result will be the same. I just mention this to show that there is
nothing inherently different between adding a class manually and using the
wizard.


--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Bruno van Dooren said:
none of those for a simple class.
select 'add class' then select the C++ tab and add a C++ class. you can
choose between Managed (.NET) and plain C++.
that will generate the header and source files for your class.

That's what I do as well, however going the "Component Class" route doesn't
add much extra code at all (about 6 lines) and it lets you add the resulting
class to your forms and set the properties and event handlers using the
designer... so you may consider that for public classes.
 
Back
Top