#include
#include
using namespace std;
The template & lt; Typename DataType>
Struct Node
{
DataType data;
Struct Node * next;
};
The template & lt; Typename DataType>
The class LinkList
{
Public:
LinkList ();
Bool If_Empty ();
Void PrintList ();
Int Length ();
DataType Find_Value_By_Pos (int pos);
Int Find_Pos_By_Value DataType (value);
Private:
Node
Node
};
The template & lt; Typename DataType>
LinkList
The first=new Node
First - & gt; Next=nullptr;
}
The template & lt; Typename DataType>
Bool LinkList
If (first - & gt; Next==nullptr)
{
return 1;
}
The else
{
return 0;
}
}
The template & lt; Typename DataType>
Void LinkList
Node
While (PTR!=nullptr)
{
Cout & lt;
Cout & lt;
The template & lt; Typename DataType>
Int LinkList
The Node * p=first - & gt; Next;
int count=0;
While (p!=nullptr)
{
count++;
}
return count;
}
The template & lt; Typename DataType>
DataType LinkList
Node
int count=1;
While (p!=nullptr& & Count
P=p - & gt; Next;
count++;
}
If (p==nullptr)
{
Throw "find position error";
}
The else
{
The return p - & gt; The data;
}
}
The template & lt; Typename DataType>
Int LinkList
Node
int count=1;
While (p!=nullptr)
{
If (p - & gt; data=https://bbs.csdn.net/topics/=value)
{
return count;
}
count++;
P=p - & gt; Next;
}
return 0;
}
CodePudding user response:
The main function of you?CodePudding user response:
And the main function it doesn't matter, I just point the generation of the solution, not to start the debuggerCodePudding user response:
Feeling is this file is not included in the project, compile this file alone could not find calls its main functionCodePudding user response:
I tried it onIn the back with
Int main ()
{
return 0;
}
There is no error
CodePudding user response:
Ha ha ha ha yes yes added int main, ha ha ha I want to be your stupid cry ha ha ha ha