Solved

what "PRAGMA   , "implementation  "" means?

Posted on 2001-07-02
6
593 Views
Last Modified: 2012-06-27
#ifdef PRAGMA
#pragma implementation "OtEchoMae_Actor.h"



0
Comment
Question by:she25
  • 3
  • 2
6 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 6246704
"#pragma" are directives that are specific to the compiler.
What compiler are you using, and what OS?
0
 

Author Comment

by:she25
ID: 6246707
I am not sure, unix, sloris!
0
 
LVL 30

Expert Comment

by:Axter
ID: 6246713
What is the command line that you use to compile your code?
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.

 
LVL 30

Accepted Solution

by:
Axter earned 50 total points
ID: 6246718
Because the #pragma are compiler specific, you should check the man-page to find the specific meaning for your compiler.

On the commandline, type the following:
man c++
or
man cc
or
man gpp
or
man gcc

Depending on which of the above you use to compile you code, would depend on which man page you should type in.
0
 

Author Comment

by:she25
ID: 6246742
I am not sure, unix, sloris!
0
 

Expert Comment

by:MichelHermier
ID: 6252220
Pragmas are specific to each compiler, but somes are common.

On the short part of code you have done it says :

#ifdef PRAGMA
     if the preprocessor as the macro PRAGMA definied
     then do all to the next #endif

#pragma implementation "OtEchoMae_Actor.h"
     then preprocessor do implemetation of file...

for an explanation of pragma implementation, take a look at this extract of the web page http://www.cis.ksu.edu/Systems/Info/develop/gcc.info.C++_Interface.html

`#pragma implementation'
`#pragma implementation "OBJECTS.h"'
     Use this pragma in a *main input file*, when you want full output
     from included header files to be generated (and made globally
     visible).  The included header file, in turn, should use `#pragma
     interface'.  Backup copies of inline member functions, debugging
     information, and the internal tables used to implement virtual
     functions are all generated in implementation files.

     `#pragma implementation' is *implied* whenever the basename(1) of
     your source file matches the basename of a header file it
     includes.  There is no way to turn this off (other than using a
     different name for one of the two files).  In the same vein, if
     you use `#pragma implementation' with no argument, it applies to an
     include file with the same basename as your source file.  For
     example, in `allclass.cc', `#pragma implementation' by itself is
     equivalent to `#pragma implementation "allclass.h"'; but even if
     you do not say `#pragma implementation' at all, `allclass.h' is
     treated as an implementation file whenever you include it from
     `allclass.cc'.

     If you use an explicit `#pragma implementation', it must appear in
     your source file *before* you include the affected header files.

     Use the string argument if you want a single implementation file to
     include code from multiple header files.  (You must also use
     `#include' to include the header file; `#pragma implementation'
     only specifies how to use the file--it doesn't actually include
     it.)

     There is no way to split up the contents of a single header file
     into multiple implementation files.
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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

910 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

21 Experts available now in Live!

Get 1:1 Help Now