On Wed, Apr 14, 2010 at 4:22 PM, Mohit Singh <[email protected]> wrote:
>
> #include<iostream>
> #include<string>
>
> using namespace std;
>
> int main()
> {
> string s;
> cout << "Please enter your first name followed by a
> newline\n";
> cin >> s;
> cout << "Hello, " << s << '\n';
> return 0; // this return statement isn't necessary
> }
>
> Turbo C++ of 1991 will fail because namespaces were added to C++ in
> 1998. Any C++ program without namespaces is a sin today. This is a
> simple test code given by none other than Bjarne Stroustrup - the
> creator of C++!
>
> Still any room left for Turbo C++?
>
>
>
Mohit,
it will fail in Turbo-C 1.0 (or 1.01a; but this program will work in Turbo-c
3-- which many people use).
For them it's just a matter of upgrading their version of tubo-c OR of
adding conditional compilation-- to overcome the hurdle.
Regards,
Nalin
--
l...@iitd - http://tinyurl.com/ycueutm
To unsubscribe, reply using "remove me" as the subject.