-
Update a struct
There may be a quick answer to this question but...
If I have a struct, is there anyway to parse an sql-like statement and update structs?
For example, if I have a struct like:
struct customers (
name char [32];
address char [128];
);
and a statment like "insert into customers (name, address) values ("John Doe", "Central Park");"
I can parse the string to get name = "john doe" and address = "Central Park", but could I create a string like customers.name="john doe" and use this to access and update the struct?
-
First, please use copy and paste -- all relevant code -- instead of typing anew, because your struct has laughable errors.
If you can parse it into one string, there should be nothing stopping you from parsing it into any other string, right? It's just the name of the string you are parsing it into that you seem to be wrestling against.