Joined: 28 Nov 2008 Posts: 373 Location: Occupation.
Posted: Thu Dec 30, 2010 5:47 pm Post subject: C++ Function help
So i'm learn C++ from tutorials online and i like you can include <cmath> for sqrt and other mathematical operations. But what other functions (or is that what they are called) can i use? And wouldn't it be smart to use them all instead of just the ones you need. Or do they interfere?
Joined: 25 Jan 2006 Posts: 8556 Location: 127.0.0.1
Posted: Thu Dec 30, 2010 8:52 pm Post subject:
There are hundreds of headers that contain certain definitions for various functions, API, wrappers / helpers, etc. which isn't exactly confined to a specific list anywhere.
cmath holds definitions for various math functions, like you said. You can open the file and read through it if you want to know what other functions it contains.
If you are unsure what header is needed for a Win32 API, your best bet is to always look at the MSDN documentation for the API first:
http://msdn.microsoft.com/en-us/default
There is no reason to include headers you don't plan to use, you start adding unneeded linking to the application which can make your file size large and become annoying to debug. (Depending on the header and so on, some may be compiled out depending on compiler settings etc.) _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum