problen Dec C++ <conio2>

Hello! I use Dev C ++, I install the package <conio2> and it does not bind to the compiler, which I can do.

Use <iostream>
using namespace std;

[code
#include <iostream>
#include <conio2>


using namespace std;
int main ()
{

int hor, Lmin, seg, nseg;
cout<<"\t\t\t\tReloj cutre"<<endl;

for (hor=0; hor<24;hor++){
for (Lmin=0; Lmin<60; Lmin++){
for (seg=0; seg<60 ;seg++){
for (nseg=0; nseg<60; nseg++){

cout<< "Tiempo:" <<hor<< ":" <<Lmin<< ":" <<seg<<endl;
cout << setxy(10, 10)<< setclr(YELLOW) << setbk(BLUE) << "Hello";
gotoxy ( 35, 7);
}}}}
\code]
Last edited on
What error message are you getting?
[Error]conio2;No such file or directory
closed account (oy0Gy60M)
#include <conio2> should be #include <conio.h> .
Last edited on
Possibly the name should be <conio2.h> (I'm not sure).

If that doesn't work, then the compiler is not aware of the directory where the header file is located.
You can set it under the menu heading
tools->compiler options->Directories->C++ Includes

There's a little yellow icon in the bottom right of the pop-up window to allow adding a new directory to the list.
Not worth the solution; thank you.
use #include<conio.h>
Well, I did try the conio2 package
https://sourceforge.net/projects/conio/files/devpak/CONIO%202.0/conio-2.1-1mol.DevPak/download

Using DevC++, from menu:
tools->package Manager
Install Package

which went smoothly for me.

Then there are three further steps.
1. configure Devcpp include path (if necessary) so it can find the header conio2.h when compiling

2. configure Devcpp library path (if necessary) so it can find the library libconio.a when linking

3. most important. When compiling, add -lconio to the linker options. (tools->compiler options -> add the following commands when calling the linker).

Each step is fairly easy, but it requires all of them to get it working.
Topic archived. No new replies allowed.