typedef unsigned int zuint; typedef unsigned char zuchar; class zmem_exception { private: zuint good_bytes; public: zmem_exception(zuint gb) : good_bytes(gb) {}; zuint bytes_ok() { return good_bytes; }; }; class zmem_wr_exception : public zmem_exception { public: zmem_wr_exception(zuint gb) : zmem_exception(gb) {}; }; class zmem_rd_exception : public zmem_exception { public: zmem_rd_exception(zuint gb) : zmem_exception(gb) {}; }; class zmemory { zuchar memdevice[1024]; public: zuint store(const zuchar * data, const zuint& dataaddr, const zuint& datalen) throw(zmem_wr_exception); zuint read(zuchar * data, const zuint& dataaddr, const zuint& datalen) throw(zmem_rd_exception); };