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
1904

... historian (+ 1977) February 5 - Walter Gross[?], cabaretist (+ 1989) February 7 - Ernst Ginsberg[?], actor and film director (+ 1964) February 11 - Henry ...

 
 
 
This page was created in 43.8 ms