23 lines
597 B
C
Raw Normal View History

2020-05-10 16:07:27 +02:00
#pragma once
// including a necessary library and namespace to work with strings
#include <string>
using namespace std;
// define the class
class car
{
private:
// define two fields, manufacturer and model
// this time as private to make the data only settable through the constructor or other local functions
std::string manufacturer;
std::string model;
public:
// define the constructor, taking manufacturer and model as parameters
car(std::string manufacturer, std::string model);
// define a method that will print out information
void print_info();
};