摘要:
class MatrixBase{ int rows, cols;public: MatrixBase(int the_rows, int the_cols) :rows(the_rows), cols(the_cols){} int GetRows()const { return rows; } 阅读全文
摘要:
class book{ char* title; int num_pages; int cur_page;public: book(const char* theTitle, int pages) :num_pages(pages) { title = new char[strlen(theTitl 阅读全文
摘要:
#include "stdafx.h"#include "iostream" using namespace std; class MyClass{ int _i; friend void Increment(MyClass& f);public: const int NUM; //常量值的定义:N 阅读全文