?
sorry, hab den code-tag verhauen und das erst zu spät bemerkt. hier nochmal schöner formatiert:
(und nun noch die funktion zum bearbeiten (bzw. auslesen) der datei:)
void DA::getPureNamesFromHtmlInput() {
time_t stamp;
time_t test;
stamp = clock()/CLOCKS_PER_SEC;
do
{
test = clock()/CLOCKS_PER_SEC;
} while (test != (stamp+4));
//read input file
ifstream inpFil;
inpFil.open("./index.php");
if (!inpFil.is_open()) {
QMessageBox::information(this, tr("dALM"), tr("error opening index.php"));
} else {
char cTemp[1000];
QString sTemp;
bool bStart = false;
int iPosition = 0;
QString sName = "";
while(inpFil){
inpFil.getline(cTemp, 1000);
if (inpFil){
sTemp = cTemp;
if (!bStart) {
if (sTemp.indexOf("first odd", 0) != -1) bStart = true;
} else {
if (sTemp.indexOf(".deviantart.com", 0) != -1) {
QString sUppCase = "</a>";
if (sTemp.indexOf("</a>", 0) == -1) sUppCase = "</A>";
iPosition = sTemp.indexOf(".deviantart.com/", 0) + 18;
for (int i = iPosition; i < sTemp.indexOf(sUppCase, 0); ++i) {
sName.append(sTemp[i]);
}
vNames.push_back(sName.toLower());
sName = "";
} // if (sTemp.indexOf(".deviantart.com", 0) != -1)
} // if - else (!bStart)
} // if (inpFil)
} // while (inpFil)
} // if - else (!inpFil.is_open())
} // getPureNamesFromHtmlInput()
//Edit: cpp tags