Quantcast
Channel: Classes Objects Struct etc – Electronic Designer
Browsing latest articles
Browse All 18 View Live

Create A New Class

To create A new class, which will create the .cpp and .h files: Project > Add Class > C++ Class Typically: Specify the class name.  You don’t need to provide a base class. Select public and...

View Article



Global Class Objects

Creating A Global Class Often its useful in an application to be able to use an object from anywhere. On first attempts this seems impossible for managed classes, but the solution is to use a class...

View Article

Structures/Class Of Our Own Data Types

Often with a class you want the application to use structures or variables that can be passed to the classes functions to be read or written with data. There is no real difference between a class or...

View Article

Creating Basic Class / Struct

ref class and ref struct are the same thing. You could replace class with struct below, but no-one uses struct. Define a structure public ref class DOCINFO { public: String ^DocumentName; String...

View Article

Forward Declarations Of A Class

When you use references to a class in another classes header file (e.g. becuase the class uses the other class objects in function calls or as objects for its own use) then instead of including the...

View Article


Adding new class to a form

Form designer won’t allow you to add new classes before the main form class. In fact you can place a class before the forms main class no problem for the compiler – its just the form editor that won’t...

View Article

.Classes (& Struct) General

Objects represent the people, places and things in your program. For example individual invoices sent and invoices received are invoices. Classes are the units of code you write to make objects come to...

View Article

Copy A Class

Copying A Class If your class has no pointer and no dynamic memory allocation then you don’t need to provide a copy function – you can use ‘=’. However if this isn’t true (i.e. your class contains a...

View Article


Arrays In A Class

Resizing An Array Of Objects In A Class It won’t work. Best approach usually is to use a list instead of an array. Alternatively you have to copy the array to a new array with a different size using...

View Article

Browsing latest articles
Browse All 18 View Live




Latest Images