How does C++ interact with the Operating System? -


like how javascript able manipulate dom because browser exposes dom javascript in form of object. same way c++ able things draw on screen? operating system create c++ interface in form of c++ classes or operating system have generic interface specific version of c++ knows how implement?

enter image description here

if @ things os's persepctive, provides api's things graphics, ipc, , io, common interface. typicaly takes form of linkable subroutines using calling convention standard os. people create languages (compilers or interpreters) provide own code interfaces subroutines, can use them in user code. c compilers, typically takes form of calling os routines directly. higher-level languages, there layer of code takes care of of nitty details you, converting cookies classes, or complete portable high-level facility might see in scripting languages.

in c++'s case, in stl , see if there's there can use. if not, typical fallback call os routines directly c user would. used case things, outside of basic text i/o, not available in stl, have fall making direct os calls. however, recent revisions of language have started adding more , more interfaces typical os functionality stl. also, there's stuff in boost want want, if don't mind downloading it, installing it, , figuring out how works.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -