#include<stdio.h>
void fcn(int, int, int);
int main() {
printf("hello\n");
while(1) {
int front,rear,rotate;
scanf("%d %d %d",&front, &rear, &rotate); getchar();
fcn(front, rear, rotate);
}
return 0;
}
void fcn(int front, int rear, int rotate) {
//mansung, test print
printf("in [front,rear,rotate]=[%d,%d,%d]\n",front, rear, rotate);
//ex) 1 0 30 => go, rot30
//do
}
--------------------------------------------------------------
파일만드는법.
터미널키고
vi test_module.cpp
로 vi를키고
소스를 붙여넣는다.
그 후 esc를 누르고
:wq! 를 눌러서 저장하고 강제종료한다.
그다음 gcc -o test_module test_module.cpp 를하면
test_module 실행파일이 만들어진다.
./test_module
을하면 프로그램이 실행되고
세개의 입력변수를 입력한다.
ex) 1 0 30
종료ㅕ하려면 ctrl+c
'소프트웨어 > Linux/Device Driver' 카테고리의 다른 글
ARM] ARM 최적화로 인한 코드 오동작 방어 (4) | 2018.07.23 |
---|---|
source backup (0) | 2014.09.03 |
rasp] opencv설치 (0) | 2014.09.02 |
Linux] sh파일에서 export 안될때 (0) | 2014.08.21 |
Linux] Ubuntu에서 putty처럼 minicom 사용 (0) | 2014.08.05 |
Linux] Ubuntu Chrome Remote Control Error_chrome_remote_desktop_20140805_033253_s_M4NS (1) | 2014.08.05 |
linux] apt-get 404 오류 해결법 (0) | 2014.07.22 |