首页 > > 详细

C辅导 Array based LIFO辅导留学生asp程序

Introduction
:
#include
#include
using namespace std;
int Array=NULL;
int Size=7;
int count=0;
int testData[100];
void GetFile()
{
int i;
ifstream fin(“DataIn.txt”);
fin.is_open();
i=0;
while(!fin.eof())
{
fin>>testData[i];
i++;
}
}
void pop()
{
cout<<”…pop”<
*Requirement
Array based LIFO
Write a program that implements an array based stack. UDFs should be used extensively.
Main should only contain calls to UDFs. Variables used may be declared globally.
These are the UDFs that you should include:
The array for the stack will be integers.
The integers pushed are from DataIn.txt
void GetFile();
void pop();
void push(int t);
void display();
void isfull();
void isempty();
void initialize();
My maxsize was 7.
Use an external file for input. This file is DataIn.txt
Here is my main: Copy it
int main()
{
GetFile();
initialize();
display();
for (int i=0;i

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!