Created
October 12, 2012 04:15
-
-
Save harrisony/3877260 to your computer and use it in GitHub Desktop.
Awesome hacky code!
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
void list_generator(int (*process)(Record, string[]), string options[], string success, string failure){ | |
bool _recordcount = 0; | |
Record processing[recordcount]; | |
for (int i=0; i <= recordcount; i++){ | |
if ((*process)(records[i], options) > 0){ | |
processing[++_recordcount] = records[i]; | |
} | |
} | |
if (_recordcount > 0){ | |
cout << success; | |
for (int i=0; i<= _recordcount; i++){ | |
cout << processing[i].title << endl; | |
} | |
} else{ | |
cout << failure; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment