All pastes #2081447 Raw Edit

SWEMike

public cpp v1 · immutable
#2081447 ·published 2011-09-19 23:44 UTC
rendered paste body
#ifndef _CLASSES_H_#define _CLASSES_H_#include "stdafx.h"#include <iostream>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