C++ – where is the proper place to instantiate my class? via /r/learnprogramming


C++ – where is the proper place to instantiate my class?

Hello

I am a cpp beginner.

I have one class called MainWindow which is in charge for the GUI. When its constructor gets called the gui is actually setup. I instantiate this class from my main.cpp I have another class with code for image processing and computer vision.

Now the question is should I instantiate the computervision class from my main.cpp or from the MainWindow's constructor?

When would I go for the former and when for the latter?

Submitted July 17, 2017 at 03:56PM by opencv3_3
via reddit http://ift.tt/2u2kJrs

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s