text mkdir // create a text file folder cd text // Open the text folder vi text.cpp // create text.cpp hold down the i key to enter the program after entering the press esc, then wq exit LS the -l // View directory files G ++ text.cpp // compiler text.cpp LS the -l // view the file directory ./a. OUT // run a.out
This procedure is run on a Mac, the process operation shown in FIG.
Compiled file location should be in the Mac OS / Users / (user name)