Click here to Skip to main content
15,891,828 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 5:50
Rob Philpott22-Jan-20 5:50 
GeneralRe: Is main() a callback function? Pin
honey the codewitch22-Jan-20 6:23
mvahoney the codewitch22-Jan-20 6:23 
GeneralRe: Is main() a callback function? Pin
TheGreatAndPowerfulOz22-Jan-20 10:18
TheGreatAndPowerfulOz22-Jan-20 10:18 
GeneralRe: Is main() a callback function? Pin
honey the codewitch22-Jan-20 10:53
mvahoney the codewitch22-Jan-20 10:53 
GeneralRe: Is main() a callback function? Pin
TheGreatAndPowerfulOz22-Jan-20 11:12
TheGreatAndPowerfulOz22-Jan-20 11:12 
GeneralRe: Is main() a callback function? Pin
honey the codewitch22-Jan-20 11:35
mvahoney the codewitch22-Jan-20 11:35 
GeneralRe: Is main() a callback function? Pin
TheGreatAndPowerfulOz23-Jan-20 4:29
TheGreatAndPowerfulOz23-Jan-20 4:29 
GeneralRe: Is main() a callback function? Pin
raddevus22-Jan-20 5:14
mvaraddevus22-Jan-20 5:14 
I was just reading this yesterday[^]

Quote:
All C++ programs must have a main function. If you try to compile a C++ .exe project without a main function, the compiler will raise an error. (Dynamic-link libraries and static libraries don't have a main function.) The main function is where your source code begins execution, but before a program enters the main function, all static class members without explicit initializers are set to zero. In Microsoft C++, global static objects are also initialized before entry to main. Several restrictions apply to the main function that do not apply to any other C++ functions. The main function:

* Cannot be overloaded (see Function Overloading).
* Cannot be declared as inline.
* Cannot be declared as static.
* Cannot have its address taken.
* Cannot be called.


But, maybe you are thinking it is a callback from the OS?
Or maybe you're just asking a rhetorical question? Smile | :)
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 5:21
Rob Philpott22-Jan-20 5:21 
GeneralRe: Is main() a callback function? Pin
k505422-Jan-20 7:38
mvek505422-Jan-20 7:38 
GeneralRe: Is main() a callback function? Pin
Rick York22-Jan-20 8:12
mveRick York22-Jan-20 8:12 
GeneralRe: Is main() a callback function? Pin
PIEBALDconsult22-Jan-20 10:23
mvePIEBALDconsult22-Jan-20 10:23 
GeneralRe: Is main() a callback function? Pin
Richard MacCutchan22-Jan-20 5:24
mveRichard MacCutchan22-Jan-20 5:24 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:25
mveOriginalGriff22-Jan-20 5:25 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:24
mveOriginalGriff22-Jan-20 5:24 
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 5:31
Rob Philpott22-Jan-20 5:31 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:42
mveOriginalGriff22-Jan-20 5:42 
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 6:12
Rob Philpott22-Jan-20 6:12 
GeneralRe: Is main() a callback function? Pin
Rick York22-Jan-20 14:20
mveRick York22-Jan-20 14:20 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 5:39
DRHuff22-Jan-20 5:39 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:43
mveOriginalGriff22-Jan-20 5:43 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 6:26
DRHuff22-Jan-20 6:26 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 8:06
mveOriginalGriff22-Jan-20 8:06 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 12:30
DRHuff22-Jan-20 12:30 
GeneralRe: Is main() a callback function? Pin
TheGreatAndPowerfulOz22-Jan-20 11:10
TheGreatAndPowerfulOz22-Jan-20 11:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.