두개의 프로그램 합치기?
가지등
질문 제목 : 사실딱히 뭐라해야할지...두개의 프로그램 합치기?질문 내용 :
첫번째.exe파일 소스
#includestdio.h
#includeconio.h
#includetime.h
int main()
{
int a,b;
int tam;
printf(아무수나 입력하세요 : ); scanf(%d,&a); tam=time(null);
printf(아무수나 입력하세요 : ); scanf(%d,&b); tam=time(null)-tam;
printf(\n\n입력시간차 = %d,tam);
getch();
return 0;
}
두번째.exe파일 소스
#includestdio.h
#includeconio.h
#includetime.h
#includewindows.h
void gotoxy(int x, int y)
{
coord pos = { x, y };
setconsolecursorposition(getstdhandle(std_output_handle), pos);
}
int main()
{
int tam;
tam=time(null);
for(;1;)
{
gotoxy(30,0);
printf(시간 : %d,time(null)-tam);
sleep(1000);
}
getch();
return 0;
}
--------------------------------------------------------------------------------------------------
이 두가지를 합하여 하나로 만들고싶은대요
문제는 두번째파일은 실행하고 끝날때까지 계속 실행이되어야하는대...
첫번째파일보면 값을 입력받아야하는대 그상황에서 두번째파일의소스가 작동하면 커서가 타이머가 흘러가고있는곳으로 갈텐대
커서가 1개인이상 불가능하나요?
질문을 정리하면 하나의프로그램이면서 두개의 소스는 서로 딴세계일수있는 방법...?
답변주시면 감사합니다 !