Thinking In C++ 第二版 随书配套代码

源代码在线查看: public.cpp

软件大小: 243 K
上传用户: zxixi2007
关键词: Thinking In 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				//: C05:Public.cpp
				// From Thinking in C++, 2nd Edition
				// Available at http://www.BruceEckel.com
				// (c) Bruce Eckel 2000
				// Copyright notice in Copyright.txt
				// Public is just like C's struct
				
				struct A {
				  int i;
				  char j;
				  float f;
				  void func();
				};
				
				void A::func() {}
				
				struct B {
				public:
				  int i;
				  char j;
				  float f;
				  void func();
				};
				
				void B::func() {}  
				
				int main() {
				  A a; B b;
				  a.i = b.i = 1;
				  a.j = b.j = 'c';
				  a.f = b.f = 3.14159;
				  a.func();
				  b.func();
				} ///:~
							

相关资源