c++ 将类对象 传递给类指针-类指针赋值

#include 
#include 
#include 
using namespace std;

class c1
{
  public:
	 int c;
};
class aa
{
   int a;
   c1 *pc;
public:
	   aa(c1 *p)
	{
		pc = p;
		cout<c<

zhangym@zhangym:~/Desktop$ g++ c.cpp
zhangym@zhangym:~/Desktop$ ./a.out 
34
zhangym@zhangym:~/Desktop$ 
 

你可能感兴趣的:(linux,类对象,类指针)