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.
pdoraiAsked:
Who is Participating?
 
euclid091498Connect With a Mentor Commented:
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
 
xyuCommented:
Show sample of Your code please...
0
 
pdoraiAuthor Commented:
Edited text of question
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
xyuCommented:
Send it to ok@pansw.com

0
 
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
 
alexoCommented:
pdorai, did you try my suggestion?  You also didn't answer my email.  Please provide some feedback.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.