0

In my old computer (nearly 15years), I use MsDos and Borland C++ compiler. The problem is,

#include <iostream.h>

works but

#include <iostream>
using namespace std

This doesn't works here.

Is there any way to use modern IDE on MsDos

user
  • 15
  • 4
  • Welcome to Stack Overflow. What is your question? – ggorlen Jul 20 '18 at 01:59
  • This was covered here: https://stackoverflow.com/questions/2976477/difference-between-iostream-and-iostream-h – Randy the Dev Jul 20 '18 at 02:00
  • Don’t use such an old compiler. Or if you have to don’t expect anything relevant to C++ these days to work with it – Joe Jul 20 '18 at 02:00
  • @ggorlen how can I run that in Boreland C++ – user Jul 20 '18 at 02:02
  • @RandytheDev that's not my problem, I am not asking the difference b/w them – user Jul 20 '18 at 02:04
  • @Joe is there any other compiler for dos? – user Jul 20 '18 at 02:06
  • 1
    @UjjwalSingh if your goal is to write modern C++ in Borland you can’t. It supports a very old pre-standard-library version of the language. Use a different compiler or write code suitable for the compiler. – Joe Jul 20 '18 at 02:07
  • 2
    If you want to use Borland, that's great, but this lack of support for `` is a harbinger of things to come. You are basically not going to be able to reference much of anything from the past 20 years and expect it to work. – ggorlen Jul 20 '18 at 02:08
  • The problem is I switched my Operating system to Puppy linux but it was still lagging, So I returned to MsDos – user Jul 20 '18 at 02:10
  • What is wrong with just using `#include `??? – Randy the Dev Jul 20 '18 at 02:10

1 Answers1

3

Borland is so old that it was made before the C++ Standard Library existed.

At that time the effective standard for C++ was the ARM, the Annotated Reference Manual by Bjarne Stroustrup and Margaret Ellis, and it was named <iostream.h>.

With the first standardisation in 1998 <iostream.h> was dropped, and replaced with just <iostream>.

I don't know what to say. Just use <iostream.h>, or a newer compiler.

Randy the Dev
  • 25,810
  • 6
  • 43
  • 54