c++ - does dm support c++ standard header names?
- "Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> Feb 13 2002
- Jan Knepper <jan smartsoft.cc> Feb 13 2002
- "Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> Feb 14 2002
- Jan Knepper <jan smartsoft.cc> Feb 14 2002
- "David Rasmussen" <pinkfloydhomer yahoo.com> Feb 14 2002
- Jan Knepper <jan smartsoft.cc> Feb 14 2002
- "Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> Feb 15 2002
- Jan Knepper <jan smartsoft.cc> Feb 15 2002
- "David Rasmussen" <pinkfloydhomer yahoo.com> Feb 15 2002
- Jan Knepper <jan smartsoft.cc> Feb 15 2002
- "David Rasmussen" <pinkfloydhomer yahoo.com> Feb 16 2002
- "Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> Feb 15 2002
- Jan Knepper <jan smartsoft.cc> Feb 15 2002
Hi,
I've just downloaded digital mars and have started to play around with it.
So far I like what I see except that it seems that I have to use the
old-style way of including headers. So, for example:
#include <iostream.h>
int main() {
cout << "hello\n";
return 0;
}
compiles whereas:
#include <iostream>
using namespace std;
int main() {
cout << "hello\n";
return 0;
}
does not. The compiler says 'unable to open input file iostream'. I'm
wondering if dm simply does not support the newer way of including files or
if the problem lies in my setup. I'm using dm version 8.26n on windows 2000.
Thanks in advance,
Richard.
Feb 13 2002
Richard Johnson wrote:Hi, I've just downloaded digital mars and have started to play around with it. So far I like what I see except that it seems that I have to use the old-style way of including headers. So, for example: #include <iostream.h> int main() { cout << "hello\n"; return 0; } compiles whereas: #include <iostream> using namespace std; int main() { cout << "hello\n"; return 0; } does not. The compiler says 'unable to open input file iostream'.
That's because that file does not yet exist in the package!I'm wondering if dm simply does not support the newer way of including files or if the problem lies in my setup. I'm using dm version 8.26n on windows 2000.
No, as far as I know the newer files are missing... Jan
Feb 13 2002
"Jan Knepper" <jan smartsoft.cc> wrote in message news:3C6AFE12.22D13C70 smartsoft.cc...Richard Johnson wrote:I've just downloaded digital mars and have started to play around with
So far I like what I see except that it seems that I have to use the old-style way of including headers. #include <iostream> using namespace std; int main() { cout << "hello\n"; return 0; } does not compile. The compiler says 'unable to open input file
That's because that file does not yet exist in the package! No, as far as I know the newer files are missing...
Surely it's the same file? As I understand it you can include iostream by typing "#include <iostream.h>" but the proper way of doing it is by typing "#include <iostream>". Whichever method you use you're still talking about the same header file aren't you?? Richard.
Feb 14 2002
Surely it's the same file? As I understand it you can include iostream by typing "#include <iostream.h>" but the proper way of doing it is by typing "#include <iostream>". Whichever method you use you're still talking about the same header file aren't you??
AFAIK yes. iostream could just #include <iostream.h>... Jan
Feb 14 2002
"Jan Knepper" <jan smartsoft.cc> wrote in message news:3C6BE6AF.A6092700 smartsoft.cc...Surely it's the same file? As I understand it you can include iostream
typing "#include <iostream.h>" but the proper way of doing it is by
"#include <iostream>". Whichever method you use you're still talking
the same header file aren't you??
AFAIK yes. iostream could just #include <iostream.h>... Jan
However, I've just realised this still doesn't give me the 'std' namespace - but that's too much like hardwork to sort out right now so maybe I'll forget about namespaces for now... Richard.
Feb 14 2002
"Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> skrev i en meddelelse news:a4dji3$240h$1 digitaldaemon.com...does not. The compiler says 'unable to open input file iostream'. I'm wondering if dm simply does not support the newer way of including files
if the problem lies in my setup. I'm using dm version 8.26n on windows
Thanks in advance, Richard.
The compiler doesn't seem to support namespaces either?! #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } This produces errors, when compiled, even if iostream.h is used instead... Can this be true?? I thought this compiler was good! /David
Feb 14 2002
Yes, it can be true because of the fact that cout is NOT defined in the std namespace. Jan David Rasmussen wrote:"Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> skrev i en meddelelse news:a4dji3$240h$1 digitaldaemon.com...does not. The compiler says 'unable to open input file iostream'. I'm wondering if dm simply does not support the newer way of including files
if the problem lies in my setup. I'm using dm version 8.26n on windows
Thanks in advance, Richard.
The compiler doesn't seem to support namespaces either?! #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } This produces errors, when compiled, even if iostream.h is used instead... Can this be true?? I thought this compiler was good! /David
Feb 14 2002
"Jan Knepper" <jan smartsoft.cc> wrote in message news:3C6C4926.1CAD8B4D smartsoft.cc...Yes, it can be true because of the fact that cout is NOT defined in the
namespace. Jan
Richard.
Feb 15 2002
In the latest standard it is I think. Richard Johnson wrote:"Jan Knepper" <jan smartsoft.cc> wrote in message news:3C6C4926.1CAD8B4D smartsoft.cc...Yes, it can be true because of the fact that cout is NOT defined in the
namespace. Jan
Richard.
Feb 15 2002
"Jan Knepper" <jan smartsoft.cc> skrev i en meddelelse news:3C6C4926.1CAD8B4D smartsoft.cc...Yes, it can be true because of the fact that cout is NOT defined in the
namespace. Jan
So this compiler is not ANSI/ISO compliant in the least bit? According to ANSI/ISO compliance, cout is defined int the std namespace. In practice, this means that most modern, compliant code cannot be compiled with this compiler. That's a shame. /David
Feb 15 2002
It is not completely compliant YET with the latest ANSI/ISO standards... Jan David Rasmussen wrote:"Jan Knepper" <jan smartsoft.cc> skrev i en meddelelse news:3C6C4926.1CAD8B4D smartsoft.cc...Yes, it can be true because of the fact that cout is NOT defined in the
namespace. Jan
So this compiler is not ANSI/ISO compliant in the least bit? According to ANSI/ISO compliance, cout is defined int the std namespace. In practice, this means that most modern, compliant code cannot be compiled with this compiler. That's a shame. /David
Feb 15 2002
Which is 4 years old :) "Jan Knepper" <jan smartsoft.cc> skrev i en meddelelse news:3C6D2143.6ECFC52B smartsoft.cc...It is not completely compliant YET with the latest ANSI/ISO standards... Jan David Rasmussen wrote:"Jan Knepper" <jan smartsoft.cc> skrev i en meddelelse news:3C6C4926.1CAD8B4D smartsoft.cc...Yes, it can be true because of the fact that cout is NOT defined in
stdnamespace. Jan
So this compiler is not ANSI/ISO compliant in the least bit? According
ANSI/ISO compliance, cout is defined int the std namespace. In practice, this means that most modern, compliant code cannot be compiled with this compiler. That's a shame. /David
Feb 16 2002
"David Rasmussen" <pinkfloydhomer yahoo.com> wrote in message news:a4hg6h$th4$1 digitaldaemon.com...The compiler doesn't seem to support namespaces either?! #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } This produces errors, when compiled, even if iostream.h is used instead... Can this be true?? I thought this compiler was good! /David
I think the compiler does support namespaces (in the sense that you can create your own namespaces) but the standard c++ headers have not been placed in the std namespace as they are supposed to be. That's why you can't use std::cout. Richard.
Feb 15 2002
Richard Johnson wrote:"David Rasmussen" <pinkfloydhomer yahoo.com> wrote in message news:a4hg6h$th4$1 digitaldaemon.com...The compiler doesn't seem to support namespaces either?! #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } This produces errors, when compiled, even if iostream.h is used instead... Can this be true?? I thought this compiler was good! /David
I think the compiler does support namespaces (in the sense that you can create your own namespaces)
Correct to some extend. Walter is working on this.but the standard c++ headers have not been placed in the std namespace as they are supposed to be. That's why you can't use std::cout.
Correct. Jan
Feb 15 2002









"Richard Johnson" <rich REMOVETHISBITnorthernsky.uklinux.net> 