完成串

This commit is contained in:
lifei
2020-12-02 20:52:43 +08:00
parent 78768b4050
commit a36107416b
5 changed files with 591 additions and 0 deletions

25
ch4/link.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
typedef struct StringNode
{
char ch;
struct StringNode *next;
} StringNode, *String;
bool InitString(String &S)
{
S = (StringNode *)malloc(sizeof(StringNode));
if (S == NULL)
{
return false;
}
S->next = NULL;
return true;
}
int main(int argc, char const *argv[])
{
String S;
InitString(S);
return 0;
}