Solved

decl - identifiers

Posted on 1998-09-05
8
267 Views
Last Modified: 2010-04-02
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
Comment
Question by:pdorai
8 Comments
 
LVL 3

Expert Comment

by:xyu
ID: 1172057
Show sample of Your code please...
0
 

Author Comment

by:pdorai
ID: 1172058
Edited text of question
0
 
LVL 3

Expert Comment

by:xyu
ID: 1172059
Send it to ok@pansw.com

0
 
LVL 11

Expert Comment

by:alexo
ID: 1172060
Did you try to #include <complex> (without .h)?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:eric_m
ID: 1172061
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
 
LVL 11

Expert Comment

by:alexo
ID: 1172062
Try copying the <complex.h> from the UNIX include directory into the source directory of the WINDOWS machine and compile.
0
 

Accepted Solution

by:
euclid091498 earned 100 total points
ID: 1172063
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
 
LVL 11

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now