《C/C++程序员实用大全》配套代码,适用初学C++的人员。

源代码在线查看: sizeof.cpp

软件大小: 608 K
上传用户: yyyz
关键词: 程序员 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#include 
				#include 
				
				class Base {
				 public:
				   Base(char *message) { strcpy(Base::message, message); }; 
				   void show_base(void) { cout 				 private:
				   char message[256];
				};
				
				class Derived: public Base {
				 public:
				   Derived(char *dmsg, char *bmsg) : Base(bmsg) {
				     strcpy(message, dmsg); };
				   void show_derived(void) 
				   { 
					 cout 				     show_base(); 
				   };
				 private:
				   char message[256];
				};
				
				void main(void)
				 {
				   Base some_base("This is a base");
				   Derived some_derived("Derived message", "Base message");
				
				   cout 				   cout 				 }
				
							

相关资源