Thread overview | |||||
---|---|---|---|---|---|
|
April 11, 2010 "using namespace std;" declaration fails | ||||
---|---|---|---|---|
| ||||
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 Re: "using namespace std;" declaration fails | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jordon Hirshon | 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 Re: "using namespace std;" declaration fails | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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"; } |
Copyright © 1999-2021 by the D Language Foundation