Last active
August 29, 2015 14:20
-
-
Save thiagomg/3599dd59ff6bd7632fd4 to your computer and use it in GitHub Desktop.
Do macro ao template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Generico. Sem tipos declarados | |
#define FILL(v, i, start, end, step) { \ | |
for(i=start; i < end; i+=step) \ | |
v.push_back(i); \ | |
} | |
#define ACCUM(v, ret) { \ | |
for(size_t i=0; i < v.size(); i++) \ | |
ret += v[i]; \ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment