C++
class dynamicClass {
public: …….
private:
string name;
int *q;
int length;
};
// constructor
dynamicClass:: dynamicClass () {
q = new int[10]; // dynamic data
….
}
-Name at leastTWOclass functions you should add/code for the dynamic data in this class. (HINT: Look at the member variables). Just name the modules,you do not have to write code.
- Adding this code prevents what type(s) of issues that can occur with pointer/dynamic data.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here