Home > Software engineering >  Fatal error C1004: unexpected end of file is found
Fatal error C1004: unexpected end of file is found

Time:10-06

//topic: write a two-way foaming sort algorithm,
#include
using namespace std;
#include

//function results status code
# define OK 1
# define the ERROR 0
# define OVERFLOW - 2
Typedef int the Status;//generally as a function return value type, its value is a function on behalf of the state of the code

64//# define MAXSIZE the maximum length of the sequence table (the length of the array)
Typedef int KeyType;//the type of keywords
Typedef char * infotypes.//other data item type
Typedef struct
{
KeyType key;//sorting keywords
Infotypes otherinfo;//other items (satellite data)
} RedType;//data element (or records) of type

//to the order of the row record storage structure (that is, the sequence table type)
Typedef struct
{RedType r [MAXSIZE + 1];//storage for row record an array of idle or as posts (r [0])
int length;//storage for the length of the row record
} SqList; The type of table//order

//input to row record
Void Create_Sq (SqList & amp; L)
{
Int I, n;
Cout<& lt;" Please enter the number of data, no more than "& lt; cin> n;//input number
While (n> MAXSIZE)
{
Cout<& lt;" Number more than limit, no more than "& lt; cin> n;
}
Cout<& lt;" Please input to sort the data (enter a keyword) of each record: \ n ";
for(i=1; i<=n; I++)
cin> Their lives [I]. The key;
L.l ength=n;
}

//output
Void show (SqList L)
{
int i;
for(i=1; i<=L.l ength; I++)
CoutCout}

Void ABC (SqList & amp; L)
//for their lives [1.. n] two-way bubble sort, the two adjacent to two opposite direction blister
{int I=1, j;//set tag

RedType temp.
J=L.l ength;
While (i{
For (j=L.l ength; Their lives [j] key<0; J -)

for(i=1; Their lives [I] key> 0; I++)

If (i{temp=their lives [I];
Their lives [I]=their lives [j];
Their lives [j]=temp; }





}//algorithm end

Void main ()
{
SqList L;
Create_Sq (L);
CoutCout<& lt;" Before ordering status to: "& lt; Show (L);
CoutABC (L);
Cout<& lt;" The sorted result to: "& lt; Show (L);
System (" pause> Nul ");
}

CodePudding user response:

See program,,, the word is not important

CodePudding user response:

Run into a similar problem is done with
/*... every time." */comment out different parts to recompile again, until orientation to the location of the specific grammatical errors, "
The methods to solve of,
  • Related