#include <iostream>
#include <cstring>
using namespace std;
class Student
{
string name;
int marks[10];
char * dep[5];
int total_markes;
public:
Student (Student &&obj)
{
strcpy(name,obj.name);
total_markes = obj.total_markes;
for(int i=0;i<=10;i++)
{
marks[i] = obj.marks[i];
obj.marks[i] =0;
}
dep = new char[5];
strcpy(dep,obj.dep);
obj.dep = nullptr;
}
}; write move constructor for this.
int main()
{
cout << "Hello, World!";
Student stud1;
Student stud2 = move(stud1);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: