Thread overview
"using namespace std;" declaration fails
Apr 11, 2010
Jordon Hirshon
Apr 13, 2010
Walter Bright
Apr 13, 2010
Jordon Hirshon
April 11, 2010
I'm trying to compile a simple ".cpp" file with the command line: sc filename -I/dm/stlport/stlport.  It produces: "Error: identifier expected" at the semicolon of std.

I browsed through some of the posts on the forum, but nothing worked.

Any suggestions?

Thanks,
Jordon Hirshon
April 13, 2010
Jordon Hirshon wrote:
> I'm trying to compile a simple ".cpp" file with the command line: sc filename
> -I/dm/stlport/stlport.  It produces: "Error: identifier expected" at the
> semicolon of std.
> 
> I browsed through some of the posts on the forum, but nothing worked.
> 
> Any suggestions?

Please post the exact source code of the file you're trying to compile.
April 13, 2010
Here's the file I'm trying to compile.  I'm using version 8.29.21n of the Digital Mars compiler.

I'm using this command to compile:
 dmc test_hello -I\dm\stlport\stlport

Thanks for your help.

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world\n";
}