完成串

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

21
ch4/sequence_dynamic.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#define MAXLEN 255
typedef struct
{
char *ch;
int length;
} HString;
void InitString(HString &S)
{
S.ch = (char *)malloc(MAXLEN * sizeof(char));
S.length = 0;
}
int main(int argc, char const *argv[])
{
HString S;
InitString(S);
return 0;
}