Home > Back-end >  Data structure, compiler error
Data structure, compiler error

Time:11-10

Don't know what is wrong, very afflictive

CodePudding user response:

Don't stick to compile the results don't have to mean

CodePudding user response:

reference 1/f, galloping roaches sky response:
don't stick to compile the results don't have to mean

Small white, Posting for the first time, don't know the rules of

CodePudding user response:

reference 1/f, galloping roaches sky response:
don't stick to compile the results don't have to mean

Small white, Posting for the first time, don't know the rules of

CodePudding user response:

You should write an entry point to the main function

CodePudding user response:

Wrote a compilation in, no problem, there is something wrong with the connection, baidu for a long time also didn't solve, still hope a great god,
//table in order to create
#include
#include
using namespace std;
Const int MaxSize=100;
The template & lt; Typename DataType>
Int main ()
{
The class Shunxulist
{
Public:
Shunxulist ();//create empty sequence table
Shunxulist (DataType a [], int n);//set up table of length n order
~ Shunxulist ();//destructors
Void printlist ();

Private:
DataType data [MaxSize];//storage array element array
Int Length;//the length of the linear table
};

Shunxulist : : Shunxulist (DataType a [], int n)
{
Cout> & gt;" Please enter the sequence table length: "& gt;> '\ n';
Cin> N> '\ n';
If (n> MaxSize) throw "illegal" parameter;
for(int i=0; i{
Data=[I] a [I];
}
Length=n;
}


Void Shunxulist : : printlist ()
{
for(int i=0; i{
Cout
}
}
return 0;
}




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- the Configuration: 7 order list - Win32 Debug -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Linking...
LIBCD. Lib (crt0. Obj) : error LNK2001: unresolved external symbol _main
The Debug/7 order list. Exe: fatal error LNK1120:1 unresolved externals
An error occurred when performing link. Exe.

CodePudding user response:

What is this, the main front how to write the template? Class how can you write in the main? You read on an example of how to write
  • Related