It varies slightly from language to language, but the base concepts are similar. See it for C/C++ here.