hello I have a piece of code starting like that:

#include <iostream>
#include <conio.h>
#include <stdlib.h>

When I have try to compile this with g++ with a command as: g++ new.cpp

I get this error:

new.cpp:2: fatal error: conio.h: No such file or directory

I couldn't find where is a mistake..Can you tell me what I am doing wrong...

I checked that I have gcc, g++ and build-essential installed on my computer.

Thank you..

Recommended Answers

All 4 Replies

I'm not 100% sure but i think if you got rid of

#include <conio.h>

that should work.

why should I get rid of it? Code uses some functions from this library.. And I use Linux OS, I should add

As I learned conio.h is a windows library, and it can't be used in linux i guess...

so i kind of was right.. =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.