std::string Path_Getter::Get_Submit_Path(std::string submit_number, Language const& language, bool golfed) { std::string full_path{CODE_GOLF_ROOT}; //get current contest number if one was not already given if (submit_number.empty()){ auto pull_number = Contest_Info_Getter::Get_Contest_Number(); if (pull_number.empty()){ Exit_With_Error("Can't deduce current contest number. Please specify!"); } submit_number = pull_number; } full_path+=submit_number; if (golfed){ full_path+="u"; } full_path+="/"; switch (language){ case Language::C: full_path += "c"; break; case Language::C_PLUS_PLUS: full_path += "cpp"; break; case Language::C_SHARP: full_path += "cs"; break; case Language::PYTHON: full_path += "py"; break; case Language::SCHEME: full_path += "scm"; break; } full_path+="/"; return full_path; }
int main(){ Exit_With_Error("Error X occurred."); return 0; }