This HTML5 document contains 42 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

Namespace Prefixes

PrefixIRI
dctermshttp://purl.org/dc/terms/
dbohttp://dbpedia.org/ontology/
foafhttp://xmlns.com/foaf/0.1/
n7https://www.learncpp.com/cpp-tutorial/121-pointers-and-references-to-the-base-class-of-derived-objects/
n17https://global.dbpedia.org/id/
dbthttp://dbpedia.org/resource/Template:
rdfshttp://www.w3.org/2000/01/rdf-schema#
freebasehttp://rdf.freebase.com/ns/
n16https://stackoverflow.com/questions/274626/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
owlhttp://www.w3.org/2002/07/owl#
wikipedia-enhttp://en.wikipedia.org/wiki/
dbchttp://dbpedia.org/resource/Category:
dbphttp://dbpedia.org/property/
provhttp://www.w3.org/ns/prov#
xsdhhttp://www.w3.org/2001/XMLSchema#
n6https://www.geeksforgeeks.org/object-slicing-in-c/
wikidatahttp://www.wikidata.org/entity/
dbrhttp://dbpedia.org/resource/

Statements

Subject Item
dbr:Index_of_object-oriented_programming_articles
dbo:wikiPageWikiLink
dbr:Object_slicing
Subject Item
dbr:Criticism_of_C++
dbo:wikiPageWikiLink
dbr:Object_slicing
Subject Item
dbr:Cloning_(programming)
dbo:wikiPageWikiLink
dbr:Object_slicing
Subject Item
dbr:Object_slicing
rdfs:label
Object slicing
rdfs:comment
In C++ programming, object slicing occurs when an object of a subclass type is copied to an object of superclass type: the superclass copy will not have any of the member variables defined in the subclass. These variables have, in effect, been "sliced off". More subtly, object slicing can likewise occur when an object of a subclass type is copied to an object of the same type by the superclass's assignment operator, in which case some of the target object's member variables will retain their original values instead of getting copied over from the source object.
dcterms:subject
dbc:C++ dbc:Articles_with_example_C++_code dbc:Object-oriented_programming
dbo:wikiPageID
197995
dbo:wikiPageRevisionID
1098748229
dbo:wikiPageWikiLink
dbc:C++ dbr:C_Sharp_(programming_language) dbr:Subtyping dbr:C++ dbr:Member_variable dbr:Diamond_problem dbr:Garbage_collection_(computing) dbc:Articles_with_example_C++_code dbr:Java_(programming_language) dbr:D_(programming_language) dbr:Assignment_operator dbr:Object-oriented_programming dbc:Object-oriented_programming
dbo:wikiPageExternalLink
n6: n7: n16:what-is-the-slicing-problem-in-c
owl:sameAs
wikidata:Q7075065 freebase:m.01c3_c n17:4sqqf
dbp:wikiPageUsesTemplate
dbt:C++_programming_language dbt:About dbt:Mono dbt:Unreferenced
dbo:abstract
In C++ programming, object slicing occurs when an object of a subclass type is copied to an object of superclass type: the superclass copy will not have any of the member variables defined in the subclass. These variables have, in effect, been "sliced off". More subtly, object slicing can likewise occur when an object of a subclass type is copied to an object of the same type by the superclass's assignment operator, in which case some of the target object's member variables will retain their original values instead of getting copied over from the source object. This issue is not inherently unique to C++, but it does not occur naturally in most other object-oriented languages — not even in C++'s relatives such as D, Java, and C# — because copying of objects is not a basic operation in those languages. Instead, those languages prefer to manipulate objects via implicit references, such that only copying the reference is a basic operation. In C++, by contrast, objects are copied automatically whenever a function takes an object argument by value or returns an object by value. Additionally, due to the lack of garbage collection in C++, programs will frequently copy an object whenever the ownership and lifetime of a single shared object would be unclear. For example, inserting an object into a standard library collection (such as a std::vector) actually involves making and inserting a copy into the collection.
prov:wasDerivedFrom
wikipedia-en:Object_slicing?oldid=1098748229&ns=0
dbo:wikiPageLength
2987
foaf:isPrimaryTopicOf
wikipedia-en:Object_slicing
Subject Item
dbr:Slicing
dbo:wikiPageWikiLink
dbr:Object_slicing
dbo:wikiPageDisambiguates
dbr:Object_slicing
Subject Item
dbr:Slicing_problem
dbo:wikiPageWikiLink
dbr:Object_slicing
dbo:wikiPageRedirects
dbr:Object_slicing
Subject Item
wikipedia-en:Object_slicing
foaf:primaryTopic
dbr:Object_slicing