What is a POD?

S

Smart Tag

Can someone please tell me the precise definition of a POD (Plain Old
Data) ?

Thanks!
 
N

Naive Group User

Can someone please tell me the precise definition of a POD (Plain Old
Data) ?

Thanks!

Dear sir, I have make a question in alt.html
I need experience on hand knowledge from you all Sir,
can Sir help me please?

POD is plain old data
POD as I searched google,
I understand POD is of any types for any variables that are, say,
Common to use in basic C/C++
Setting all class notions aside.
For example,
POD for a variable to hold integral value is 'integer'
i.e integer i; //declare an integer i
for character type, it is defined then as
character i=(character)(76);
 
S

Saeed Amrollahi

Can someone please tell me the precise definition of a POD (Plain Old
Data) ?

Thanks!

Hi

Besides what other wrote, I can add the following:
I think POD (Plain Old Data) as an aggregate or collection of data
like struct or union.
I think POD as something without invariant. A POD has no user-defined
special member functions
(default constructor, copy constructor, destructor, copy assignment
operator). Here is a typical
POD:
struct POD {
int i;
float f;
char c;
};

such structure has no invariant. If there is a rule for object
construction, you have to
control such thing in constructors and other special member functions.
for furthur information, please see
http://parashift.com/c++-faq-lite/intrinsic-types.html#faq-26.7
and
sections 3.9 [basic.types] and 9 [class] of C++ standard document.

Regards,
-- Saeed Amrollahi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top