Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.39 KB

l3.md

File metadata and controls

30 lines (26 loc) · 1.39 KB

3. Vorlesung

printf("x1b[20;60Hg");
  • IO with ncurses libary

  • wait microseconds with usleep (from unistd.h)

  • to clean with ncurses:

endwin()
  • declare global variables in header files, and include in source file. Declare with the extern keyword. Initialize in source file
  • in the makefile:
    • use generic rules; Example for the test:
%Test: %.o %Test.o
   g++ -o $@ -x $ -lgtest -lpthread
  • use make all
  • use variables for compiler and compiler options
  • let all .o files depend on all headers and the corresponding header file
  • to avoid declaring the main function in the test, use -lgtest_main
  • to make a rectangle add an inverted space (see ascii escape codes)