This commit is contained in:
Markus 2019-09-01 10:40:36 +02:00
parent c021a655dd
commit d54e24dfb5
4 changed files with 7 additions and 12 deletions

View File

@ -3,7 +3,6 @@

#include <iostream>
#include <vector>
#include <sys/stat.h>
#include <fstream>

struct Account {

View File

@ -234,8 +234,8 @@ std::string PageManager::replace(std::string str, std::string substr1, std::stri
if(substr1 == "")
return str;
size_t index = 0;
for (index = str.find(substr1, index); index != std::string::npos; index = str.find(substr1, index + strlen(substr1.c_str())) )
str.replace(index, strlen(substr1.c_str()), substr2);
for (index = str.find(substr1, index); index != std::string::npos; index = str.find(substr1, index + substr1.length()) )
str.replace(index, substr1.length(), substr2);
return str;
}

@ -327,7 +327,7 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
std::cout << " => Error: Konnte 'href=\"' in chooseHosterLink() nicht finden." << std::endl;
continue;
}
Line.erase(0, pos + static_cast<int>(strlen("href=\"")));
Line.erase(0, pos + 6/*static_cast<int>(strlen("href=\""))*/);

pos = Line.find("\"");
if(pos == std::string::npos) {
@ -341,7 +341,3 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
}
return "";
}





View File

@ -4,9 +4,8 @@
#include "accountManager.h"
#include "curl/curl.h"

#include <string.h>
#include <sstream>
#include <unistd.h>
#include <unistd.h> // sleep
#include <algorithm>



View File

@ -3,13 +3,14 @@

#include <iostream>
#include <getopt.h>
#include <string.h>
#include <string.h> // strlen
#include <sstream>
#include <sys/stat.h>
#include <fstream>
#include <vector>

#include <limits.h> // PATH_MAX
#include <unistd.h> // readlink()
#include <vector>

#ifdef _WIN32
#include <windows.h>