8. Classes and Structs
Activity 8: Creating a Video Clip Class
Solution:
- Create the
VideoClip
class outline:1. Create the VideoClip class outline: #include <iostream> #include <string> using namespace std; class VideoClip { public: }; int main() { return 0; }
- Create member variables for the video length and video name:
#include <iostream> #include <string> using namespace std; class VideoClip { public: float m_videoLength; string m_videoName; }; int main() { return 0; }
- Write a default constructor that initializes the video length and name to default values:
#include <iostream> #include <string> using namespace std; class VideoClip { public: VideoClip() { m_videoLength = 0; m_videoName = "...