Daves1245 / Chime

TCP Multiplexing Instant Messenger in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generic "struct to string" and "string to struct" function

Daves1245 opened this issue · comments

Given a buffer, format string, and a number of pointers, create two functions:

  • One that will read and parse the format string and write members to pointers
  • One that will write the values from pointers into the buffer as directed by the format string

basically, a scanf/printf but specifically for dynamically creating/handling arbitrary messages. Much better than hard-coded messag e structure