// 具有private访问权限的成员的应用.cpp : 定义控制台应用程序的入口点。 |
// |
#include "stdafx.h" |
#include"iostream" |
using namespace std; |
class Limit{ |
private : |
float imprest; |
void warning() |
{ |
cout << "Warning!" ; |
} |
public : |
void accept() |
{ |
cout << "\n Enter Your Name,please!\t" ; |
cin >> imprest; |
cout << "\n Your imprest is:\t" << imprest << endl; |
} |
void display() |
{ |
cout << "\n Now,Your imprest is:\t" << imprest; |
warning(); |
} |
}; |
void main() |
{ |
Limit c; |
c.accept(); |
c.display(); |
} |
//2014年4月22日19:49:13 |
//33行 |