问题描述
我正在使用Turbo并想根据该版本了解代码
即时通讯处理的代码太多了,因为代码样式不同
从turbo c borland到visual c和dev c的各个方面.
我想实现执行所有基本操作的堆栈类
我知道有6种基本操作可以对stack进行pop pop初始化.在每次push和pop之前检查堆栈是否已满和空.
指针数组将帮助用户在程序执行期间告知其容量,但静态数组是固定大小的方法.
私有成员是int top和int * array.
我想知道该程序中任何地方的主要部分和其他部分的可访问性范围都已实现
我在构造函数方面遇到了麻烦,最初的阶段是什么
stack();
在构造函数中的定义top等于-1或0(如果从零开始将首先从索引1存储元素,则从0开始存储)
它将构造一个堆栈对象,但其中
如果在main中,那么它将如何
我想知道在Turbo C中我应该使用什么头文件
希望得到良好的答复.
im using turbo and want to know code according to that version
im dealing with stack that is too much cofusing because code styles are different
in every ide from turbo c borland to visual c and dev c.
i want to implement stack class that perform all basic operations
i know there are six basic operations push pop intialization of stack.check for stack full and empty before every push and pop.
pointer array will help to tell its capacity by user during program execuation but static array is fixed size method.
private memebers are int top and int *array.
i want to know there accessibility scope realted to main and other parts where ever in the program
i am trouble with constructor what it will be at intial stage
stack();
in constructor defination top is equal to -1 or 0 if from zero first pushed element will stored from index 1 otherwise from 0)
it will construct a stack object but where
in main if in main then how it will be
i want to know in turbo c what header files i should use
hoping for good reply.
推荐答案
这篇关于对代码的理解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!