Nakuli Patidar wrote:1>Is main() function a User Define Function or Pre Defined Function?
with reason.
Nakuli Patidar wrote:
2>Can i run a c/c++ program without using main() function?
with reason(code).
Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
must not be called directly from within a C++ program (though it may be called from within a C program).
abhay jain wrote:
must not be called directly from within a C++ program (though it may be called from within a C program).
can any one please explain this with example ?
Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
Brian Overland wrote:Generally, you are going to need a main() in an freestanding program (such as an EXE file in Windows or old MS-DOS)... otherwise, there is no entry point.
Brian Overland wrote:However, it strikes me that certain kinds of executables -- specifically DLLs or Windows programs -- may not have a main() function. That is because their entry points are through other means. A Windows program, for example, is in some ways more like a DLL (dynamic-link library) than a freestanding execution. Windows will call the program through its own special entry point that it recognizes (WinMain, not predefined in C or C++ itself).
Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
just::thread C++11 thread library http://www.stdthread.co.uk
Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |