#include "initfiles.h" #include #define SETFILE "settings.ini" void loadSettings() { cout<<"LOAD SETTINGS"< 2) { interpreteLine(contents); } ifs.close(); delete(contents); } void interpreteLine(char *command) { int count = 0; int len = 0, i = 0; char *str = command; str += strspn(str," "); while (*str) { count++; str += strcspn(str," "); str += strspn(str," "); } str = command; char **parts = new char*[ count ]; str += strspn(str," "); while (*str) { int len = (int)(strcspn(str," ")); parts[i] = new char[len + 2]; memcpy(parts[i],str,len); parts[i][len] = 0; str += len + strspn(str+len," "); i++; } for(i=0;i