[DiscordArchive] maybe I don't understand something. if "main" is started first, then why is there an inscription?
[DiscordArchive] maybe I don't understand something. if "main" is started first, then why is there an inscription?
Archived author: Васильев Антон 2к 8г пед • Posted: 2023-02-21T10:27:39.977000+00:00
Original source
maybe I don't understand something. if "main" is started first, then why is there an inscription?
hrug:332268181517238272>
Archived author: MaxtorCoder • Posted: 2023-02-21T10:28:37.248000+00:00
Original source
Maybe you are doing something wrong <
hrug:332268181517238272>
Archived author: MaxtorCoder • Posted: 2023-02-21T10:29:14.094000+00:00
Original source
But `main` is always the first started func
Archived author: Saty • Posted: 2023-02-21T10:30:49.003000+00:00
Original source
Maybe its some sort of static function that gets called when the program boots up?
Archived author: Tea • Posted: 2023-02-21T10:30:51.035000+00:00
Original source
theoretically yes
Archived author: Tea • Posted: 2023-02-21T10:30:58.154000+00:00
Original source
but also practically no
Archived author: Tea • Posted: 2023-02-21T10:31:11.664000+00:00
Original source
initializers for global variables run first
Archived author: Tea • Posted: 2023-02-21T10:31:45.615000+00:00
Original source
and there are 4 that have the DatabaseWorkerPool type (LoginDatabase, CharacterDatabase, HotfixDatabase and WorldDatabase)
Archived author: Tea • Posted: 2023-02-21T10:33:25.078000+00:00
Original source
the true entry point (at least with msvc compiled binaries) is a function called _start, implementation detail that does standard library setup before main()
Archived author: Tea • Posted: 2023-02-21T10:33:44.294000+00:00
Original source
but as those are implementation detail, the only thing that matters is that main() is the entry point