- Examples
Some examples of copy and move semantics will be discussed in this lesson.
We'll cover the following...
We'll cover the following...
Example 1
Explanation
In the above example, we demonstrated how the value of str1 can be transferred to strings using two different methods: copy semantic and move semantic.
-
In line 18, we used the copy semantic, and the string
"ABCDEF"is present in bothstr1andstr2. We can, therefore, say that the value has ...