23.03.2013 Views

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

Arrays, parameter passing, pointers and dynamic allocation. - ELIS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiling with g++<br />

S g++ basic.cpp (creates “a.out” executable)<br />

S g++ -o program basic.cpp (“program” is executable)<br />

./program<br />

S Flags that are good practice<br />

S g++ -Wall -o program basic.cpp (print all warnings)<br />

S g++ -Wall -Werror -o program basic.cpp (treat warnings as<br />

compilation errors)<br />

87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!