• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

decl - identifiers

I used standard Unix C++ compiler with the <complex.h> header file. This allows me to use the complex abstract data type in the main program.

Okay, but when I use the same program, after changing the necessary library file names for use on the MSDEV Visual C++ environment, I get the "unknown decl - identifiers" error message for the the ADT type "complex". It is accepted under the Unix compiler, but not under the MSDEV compiler.

xyu --> my code is about a thousand lines. So I can attach an email to you if you give me your e-mail address.
0
pdorai
Asked:
pdorai
1 Solution
 
xyuCommented:
Show sample of Your code please...
0
 
pdoraiAuthor Commented:
Edited text of question
0
 
xyuCommented:
Send it to ok@pansw.com

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
alexoCommented:
Did you try to #include <complex> (without .h)?
0
 
eric_mCommented:
Which version of VC?  VC5 puts the standard libary in the std namespace, so you'll need to qualify those names with std.  Try using std::complex.
0
 
alexoCommented:
Try copying the <complex.h> from the UNIX include directory into the source directory of the WINDOWS machine and compile.
0
 
euclid091498Commented:
As eric_m pointed out, if you are using VC5 complex will be inside the std namespace.
If that is the case, then you can either use std::complex or to avoid qualifying complex you can type:

using namespace std;

You will then not need to qualify complex (and all other identifiers in std) for the rest of the translation unit.

Please note that qualifying with std:: is the 'prefered' solution as it avoids identifier collisions.

0
 
alexoCommented:
pdorai, did you try my suggestion?  You also didn't answer my email.  Please provide some feedback.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now