Encyclopedia > Slicing

  Article Content

Slicing

In computer science, slicing is an operation to slice off a target value by size of the base type, thus extra parts will be gone.

For example, in C++

class A
{
  int age;
  String name;
};

class B : public A
{
  bool is_male;
};

B b;
A a;
a = b; // slicing occurs.

See also: Object-oriented programming



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Islip Terrace, New York

... size is 3.21 and the average family size is 3.51. In the town the population is spread out with 29.5% under the age of 18, 6.7% from 18 to 24, 33.6% from 25 to 44, ...

 
 
 
This page was created in 22.6 ms