diff options
| author | Tyge Løvset <[email protected]> | 2020-03-11 14:45:22 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-11 14:45:22 +0100 |
| commit | 5cb3bdd51bd20b7d73914bdd363927b9210baaa7 (patch) | |
| tree | 1b59cc6092ed1dcf378c6d00511fd150dcddb628 | |
| parent | a084c423f73018aec5c49d8bcbaa38080c277cfb (diff) | |
| download | STC-modified-5cb3bdd51bd20b7d73914bdd363927b9210baaa7.tar.gz STC-modified-5cb3bdd51bd20b7d73914bdd363927b9210baaa7.zip | |
Update README.md
| -rw-r--r-- | README.md | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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() { |
