S
S
Stenrulf2016-04-14 19:23:37
C++ / C#
Stenrulf, 2016-04-14 19:23:37

Code::Blocks after launching the console application opens an empty console, how to fix it?

Downloaded from the official site and installed Code::Blocks with MinGW. But when you try to compile and run "Hello, world" in C
, an empty console opens (the cursor in the first line blinks, nothing can be typed). How to fix it?

#include "stdio.h"
#include "conio.h"

main()
{
  printf("Hello, world\n");
  _getch();
  return 0;
}

upd1: The compiler does not throw any errors

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Bogachev, 2016-04-14
@stenrulf

Try disabling your antivirus - it can interfere with debugging.

A
Alexander Movchan, 2016-04-14
@Alexander1705

Сonio.h (from the English console input-output - console input-output) is a header file used in old compilers running on MS-DOS operating systems to create a text user interface. However, it is not part of the C programming language, the C standard library, ISO C, or required by the POSIX standard.

Could this be the issue?
PS Moreover, in code::blocks the console is not closed after the program terminates, there is no need to use _getch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question