#ifndef _CLASSES_H_ #define _CLASSES_H_ #include "stdafx.h" #include using namespace std; class Product { private: int _price; const int taxes = 0.3; // 30% tax char _name[30]; void addTaxes() { _price *= taxes }; public: void assign(int price, char name); void show(); }; void assign(int price, char name[sizeof(Product::_name)]) { Product::_price = price; strncpy(Product::_name, name, sizeof(Product::_name)); } void show() { cout << Product::_name << " costs: " << Product::_price << ":- with taxes included.\n"; system("PAUSE"); } #endif