9
edits
Changes
→Useful Code Snippets
* @note needs to be free()'d after use
*/
char* runCmd(const char* cmd){
FILE* fp;
char* out = NULL;
* @note needs to be free()'d after use
*/
char* concat(const char* a, const char* b){
char* tmp = malloc(snprintf(NULL, 0, "%s %s", a, b) + 1);
sprintf(tmp, "%s %s", a, b);