C++
Created Monday 12 September 2016
Template Functions :
template< class T >
T abc( T a, T b, T c) {
return a+b+b*c+(a +b-c)/(a+b) +4 ;
}
Reference Parameters :
template<class T >
T Abc( T& a, T& b, T& c ) {
return a+b+b*c +( a+b-c) / (a+b) + 4 ;
}
New
int *y
y = new int ;
y = new int (10) // initialization
y = new int [10] ;
Delete
delete y
delete [] y
Class
class cui{
public :
cui( ) ;
~cui() ;
~cui() ;
void set() ;
int get() const { return n ; }
int get() const { return n ; }
private :
int n ;
}
friend, protected

51

被折叠的 条评论
为什么被折叠?



