21 lines
320 B
C++
21 lines
320 B
C++
#pragma once
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
class Driver
|
|
{
|
|
public:
|
|
std::string name;
|
|
int age;
|
|
Driver(std::string name, int age) {
|
|
this->name = name;
|
|
this->age = age;
|
|
}
|
|
void getInfo() {
|
|
std::cout << "Driver Info:\n" << \
|
|
"Name: " << this->name << "\n" << \
|
|
"Age: " << this->age << "\n\n";
|
|
}
|
|
};
|
|
|