NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
stamprsist
Joined: 14 Mar 2012 Posts: 2
|
Posted: Wed Mar 14, 2012 7:10 pm Post subject: problem with _getch() |
|
|
sorry guys i'm new on this forum,
i have a big problem with _getch(), i installed MINGW 5.1.4
my program don't crash but don't do nothing...
int main(int argc, char** argv) {
char x;
printf("ciao\n\n");
x=_getch();
return (EXIT_SUCCESS);
} |
|
| Back to top |
|
 |
Anwar Posted via mailing list.
|
Posted: Wed Mar 14, 2012 8:07 pm Post subject: problem with _getch() |
|
|
When I copy-paste the exact program, I get compilation errors as such:
main.cpp:4:21: error: |
|
| Back to top |
|
 |
stamprsist
Joined: 14 Mar 2012 Posts: 2
|
Posted: Wed Mar 14, 2012 8:52 pm Post subject: |
|
|
try now
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main() {
char x;
printf("ciao\n\n");
x = _getch();
return (EXIT_SUCCESS);
} |
|
| Back to top |
|
 |
Paulo R. Panhoto Posted via mailing list.
|
Posted: Thu Mar 15, 2012 12:45 pm Post subject: problem with _getch() |
|
|
As far as I can tell, this code is Microsoft specific.
After some web search, it looks like you'll have to install a library
like pdcurses or a conio port to make it work.
<http://pdcurses.sourceforge.net/>
<http://conio.sourceforge.net/>
Regards,
Paulo
On 14/03/12 17:52, stamprsist wrote:
| Quote: | #include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int main() {
char x;
printf("ciao\n\n");
x = _getch();
return (EXIT_SUCCESS);
}
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|