This commit is contained in:
2024-05-05 00:42:55 +01:00
parent 1dd0393870
commit 635aa98a1a
9 changed files with 98 additions and 0 deletions

21
src/main.c Normal file
View File

@@ -0,0 +1,21 @@
#include "cloneString/cloneString.h"
#include <stdio.h>
#include <stdlib.h>
int main() {
const char* str = "Hello, World!";
char* clone = cloneString(str);
if (clone == NULL) {
printf("Failed to clone string\n");
return 1;
}
printf("Original string: %s\n", str);
printf("Cloned string: %s\n", clone);
free(clone);
return 0;
}