انجام دادن همزمان دو عمل در C
چطور می شود دو عمل را به طور همزمان در C انجام داد؟ مثلا همزمان که یک حلقه اجرا می شود، یک داده از کیبرد گرفته شود (بدون آنکه حلقه لحظه ای متوقف شود.)
یا به عبارت دیگر :برنامه ای بنویسید که یک کاراکتر از چپ به راست از صفحه عبور کند و کاربر همزمان دو عدد را وارد برنامه کند و آن دو عدد در صفحه چاپ شوند. :wink:
Re: انجام دادن همزمان دو عمل در C
نقل قول:
نوشته شده توسط Random
چطور می شود دو عمل را به طور همزمان در C انجام داد؟ مثلا همزمان که یک حلقه اجرا می شود، یک داده از کیبرد گرفته شود (بدون آنکه حلقه لحظه ای متوقف شود.)
یا به عبارت دیگر :برنامه ای بنویسید که یک کاراکتر از چپ به راست از صفحه عبور کند و کاربر همزمان دو عدد را وارد برنامه کند و آن دو عدد در صفحه چاپ شوند. :wink:
دوست عزیز تابع kbhit رو امتحان کن !
با این تابع می تونی همزمان هم از صفحه کلید ورودی بگیری! با کمک تابع getch