Skip to content

Commit

Permalink
Add Stringification to C Preprocessor (#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
g3rrit committed Feb 13, 2021
1 parent 3e12cb0 commit 39f62fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion c_preprocessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ $ cpp -P file > outfile

```
#define DST(name) name##_s name##_t
DST(object); #=> "object_s object_t;"
DST(object); #=> object_s object_t;
```

### Stringification

```
#define STR(name) #name
char * a = STR(object); #=> char * a = "object";
```

### file and line
Expand Down

0 comments on commit 39f62fc

Please sign in to comment.