>Could someone please explain clearly the purpose or necessity for such code?
If you're using code from an external library, you usually have to link a special .lib file. Usually how it's done in most IDEs is there's special configuration options, which allow you to specify the .libs to link with.
The #pragma is a compiler-specific feature to allow you to link the libs without going into the linker config.
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
Offline 5,055 posts
since Apr 2006