Consider the following example:

```
struct MyStruct {
    int a;
    int b;
};

```

I can use macros to set a member from an instance of the struct by doing this:

```
#define setVar(x,y) instance.x = y

```

then in any function I can say:

```
setVar(a, 4)

```

How can I send in a as a string to the macro? Is that also possible?

```
setVar("a", 4)

```

EDIT: There are a bunch of predefined structs with members that are all of type double. I only know what struct I am using by an XML config file that is passed in. After parsing, I have a bunch of strings that are a list of all the data members and values that need to be set. I need to use this list to set values for each of the members in the struct.