Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define STR "my string"
- #define STR2 "my string 2"
- #define MACRO(x) do_something(x)
- int get_new_hash_map_id() {
- static int my_counter = 0;
- return ++my_counter;
- }
- void do_something(const char* s) {
- int id;
- if(is_not_in_id_hash_map(s)) {
- id = get_new_hash_map_id();
- } else {
- id = get_id_hash_map(s);
- }
- some_function(s, id
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement