c语言编程最后出现print是什么意思,print在C语言里是什么意思

匿名用户

1级

2016-10-30 回答

我搜遍了所有的 Turbo C 语言头文件,发现 LIST2.H 和 STACK2.H 中分别有e5a48de588b67a686964616f31333361323034以下函数定义:

LIST2.H

// Borland C++ - (C) Copyright 1991 by Borland International

// list2.h:   A Integer List Class

// from Hands-on C++

const int Max_elem = 10;

class List

{

protected:     // The protected keyword gives subclasses

// direct access to inherited members

int *list;        // An array of integers

int nmax;         // The dimension of the array

int nelem;        // The number of elements

public:

List(int n = Max_elem) {list = new int[n]; nmax = n; nelem = 0;};

~List() {delete list;};

int put_elem(int, int);

int get_elem(int&, int);

void setn(int n) {nelem = n;};

int getn() {return nelem;};

void incn() {if (nelem 

int getmax() {return nmax;};

virtual void print();                   // line 22

};STACK2.H

// Borland C++ - (C) Copyright 1991 by Borland International

// stack2.h:   A Stack class derived from the List class

// from Getting Started

#include "list2.h"

class Stack : public List                  // line 5

{

int top;

public:

Stack() {top = 0;};

Stack(int n) : List(n) {top = 0;};      // line 11

int push(int elem);

int pop(int& elem);

void print();

};都有 print 函数,但是没有函数体。

通过网络也无法查到相关信息。

自己摸索吧。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值