Linux环境 Linux charles-VirtualBox 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 i686 i686 i686 GNU/Linux
hello1.c
/* hello1.c
* purpose show the minimal calls needed to use curses
* outline initialize, draw stuff, wait for input, quit
*/
#include <stdio.h>
//#include <curses.h>
int main()
{
printf("Hello World");
puts("DDDD");
// initscr() ; /* turn on curses */
/* send requests */
// clear(); /* clear screen */
// move(10,20); /* row10,col20 */
// addstr("Hello, world"); /* add a string */
// move(LINES-1,0); /* move to LL */
// refresh(); /* update the screen */
// getch(); /* wait for user input */
// endwin(); /* turn off curses */
return 0;
}
* purpose show the minimal calls needed to use curses
* outline initialize, draw stuff, wait for input, quit
*/
#include <stdio.h>
//#include <curses.h>
int main()
{
printf("Hello World");
puts("DDDD");
// initscr() ; /* turn on curses */
/* send requests */
// clear(); /* clear screen */
// move(10,20); /* row10,col20 */
// addstr("Hello, world"); /* add a string */
// move(LINES-1,0); /* move to LL */
// refresh(); /* update the screen */
// getch(); /* wait for user input */
// endwin(); /* turn off curses */
return 0;
}
终端跑到 hello1.c 同目录下 之后 输入命令 gcc hello1.c -o hello1
之后会发现同目录下出现 hello1的这个可执行文件
之后 终端输入 ./hello1
运行文件