summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-03-11 14:45:22 +0100
committerGitHub <[email protected]>2020-03-11 14:45:22 +0100
commit5cb3bdd51bd20b7d73914bdd363927b9210baaa7 (patch)
tree1b59cc6092ed1dcf378c6d00511fd150dcddb628
parenta084c423f73018aec5c49d8bcbaa38080c277cfb (diff)
downloadSTC-modified-5cb3bdd51bd20b7d73914bdd363927b9210baaa7.tar.gz
STC-modified-5cb3bdd51bd20b7d73914bdd363927b9210baaa7.zip
Update README.md
-rw-r--r--README.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index ab64b94e..86bbae5b 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,7 @@ int main() {
c_Vector_cs names = c_vector_initializer;
c_vector_cs_push(&names, c_string_make("Mary"));
c_vector_cs_push(&names, c_string_make("Joe"));
+ c_string_assign(&names.data[1], c_string_make("Jake")); // replace Joe
printf("%s\n", names.data[1].str); // Access the string char*
c_vector_cs_destroy(&names);
}
@@ -61,7 +62,7 @@ Simple c_Hashmap, c_String -> int:
```
#include "c_string.h"
#include "c_hashmap.h"
-c_declare_Hashmap_stringkey(si, int); // Shorthand macro for the general c_declare_Maphash expansion.
+c_declare_Hashmap_stringkey(si, int); // Shorthand macro for the general c_declare_Hashmap expansion.
// c_String keys are "magically" managed internally, although c_Hashmap is ignorant of c_String.
int main() {