第6週プロジェクト2.

801 ワード

/*     
*                  
* Copyright (c)2012,                 
* All rightsreserved.     
*     : object.cpp     
*   :     
*     : 2013  4 5      
*    : v1.0     
*     :      
*     :      
*     :  
*/
#include<iostream>
#include<stdlib.h>
using namespace std;
class A {
private:
  int a;
public:
  A() {a=0;}
  A(int aa):a(aa){}  //      ,   aa       a
  void get(){cout<<a<<endl;};
};
int main() 
{
  A *p;//   A     p
  p=new A(100); // p             
  p->get();
  delete p;
  system("pause");
  return 0;
}