C++ Tutorial - 03 - Compile and Run
Uploader Comments (ProgrammingVideos)
All Comments (11)
-
Windows programming Question:
I have a list of window handles to top level windows and I want to shift them around so they are arranged in the z-order of my choosing. I started off by iterating the list (with the window I want to end up on top last), calling SetForegroundWindow on each one. This seemed to work some of the time but not always, improving a little when I paused slightly in between each call.
Is there a better way to do this?
-
@ProgrammingVideos ty, ill sub to you right now
-
@ProgrammingVideos Okay thanks.
-
@magetacular Yes to the first question. Without the using directive you'd need to add std:: before each function or other entity you reference from the C++ standard library. As for whether to use the directive or not that's a more difficult question. In a professional C++ project involving many people and C++ libraries you would not want to use it so the short answer is no.
why does it have the batch look when you compile it. how come windows was made in C++ and it does not have a batch look
RiverXcity 7 months ago
@RiverXcity To create a graphical interface you would need to use an API library such as MFC. That is a bit too advanced for this simple hello world demonstration.
ProgrammingVideos 7 months ago
@ProgrammingVideos wow ty, i think you earnt my sub, and can you make a tutorial on using the mfc api .
RiverXcity 7 months ago
@RiverXcity Nah, this project is complete for now. I won't be adding anymore tutorials. I still like making them, but I have had to switch over to more profitable ventures. Currently, I’m working on releasing these tutorials on Amazon in book form. Links are on the PVT site if you want to check them out.
ProgrammingVideos 7 months ago
If I do not include "using namespace std;" would I have to add "std::" before each command?
After I start creating more in-depth programs would I still be using "using namespace std;"? I prefer to curve the habits I create while learning to best fit the optimal end result.
Later on will I have sub-brackets in brackets (sorry for impatience, again end result purpose)? I ask to know whether or not I will be using multiple "using namespace __;" commands.
Just want to clear stuff up.
magetacular 11 months ago
@magetacular As for the last question I'd say no. If you have multiple C++ libraries you will not want to import them all into the global namespace since there may be conflicts.
If anyone has any better answers please share them.
ProgrammingVideos 11 months ago