<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Programm funktioniert nicht...]]></title><description><![CDATA[<p>das programm sollte eine textdatei öffnen in der Kommentare und Pfade zu Dateien stehen und unterscheiden was Kommentar und was Pfad ist.... (beides beginnt mit /*)</p>
<p>und anschließend die dateien in die richtigen Ordner kopieren...</p>
<p>eine Beispieldatei ist am ende des Threads</p>
<p>das Programm erstellt beim starten eine .ini Datei in der die Pfade stehen....</p>
<p>ach ja und der teil der am anfang der pfade fehlt ist immer gleich und steht auch in der ini</p>
<p>aber irgendwie funktioniert es nicht...</p>
<p>ich such mir jetzt schon seit 2 tagen nen wolf und komm einfach nicht drauf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>naja hier der code:</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;stdexcept&gt;
#include &lt;string&gt;
#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;direct.h&gt;
#include &lt;windows.h&gt;

using namespace std;

/* ***********************************Function CopyData******************************************** */

/* Error Handling + Kopieren der Dateien + erstellen der Ordner */
string CopyData( string zielpfad, string quellpfad, string error, string workdir, string sourcepath) //Definition einer Funktion
    {
    string myMkdir = &quot;mkdir &quot;, copy = &quot;Copy /Y &quot;;
    /*dateiname aus zielpfad löschen */
    cout &lt;&lt; &quot;\n&quot; &lt;&lt; endl;
    while (zielpfad[zielpfad.length() - 1] != '\\')
        {
        zielpfad.erase(zielpfad.length() - 1, 1);
        }
    char in[255];
    char out[255];
    strcpy(in, quellpfad.c_str());
    strcpy(out, zielpfad.c_str());
    cout &lt;&lt; in  &lt;&lt; endl;
    cout &lt;&lt; out &lt;&lt; endl;
    //lesen
    std::ifstream ifsIn(in);
    std::ifstream ifsOut(out);

    //pruefen
    if (!ifsIn)
        {error = error + quellpfad + &quot;\n&quot;;}
    else if (ifsOut)
        {std::cout &lt;&lt; &quot;Ziel existiert bereits\n&quot;;
        ifsOut.close();}

    else
        {
        //Ordner erstellen und Dateien kopieren
        cout &lt;&lt; &quot;Ordner erstellt&quot; &lt;&lt; endl;
        myMkdir = myMkdir + zielpfad;
        system(myMkdir.c_str());
        copy = copy + quellpfad + &quot; &quot; + zielpfad;
        system(copy.c_str());
        std::ofstream ofsOut(out);
        char c;

        while (ifsIn.get(c))
            ofsOut.put(c);
        //schliessen
        ifsIn.close();
        ofsOut.close();
        }
    quellpfad = sourcepath;
    zielpfad  = workdir;
    myMkdir   = &quot;mkdir &quot;;
    copy      = &quot;Copy /Y &quot;;
    return error;
    }

/* *************************** main *****************************/
int main()
    {
    /*Variablen*/
    char branch[10];       /* Branch  */
    char ver[25];          /* Version */
    //char line[256];        /* Aktuell eingelesene Zeile */
    char compilepath[100]; /* Pfad zum Compilefile */
    int  pathleght;        /* länge des aktuellen Pfades */
    int  i = 0;            /* Hilfsvariable */
    char curpath[50];      /* Pfad der .exe */
    char temp2[512];       /* Zwischenspeicher */
    string comment, quellpfad, zielpfad, error, finalerror, rename = &quot;ren &quot;, move = &quot;move &quot;, del = &quot;rmdir /Q &quot;, myMkdir = &quot;mkdir &quot;, iniName = &quot;BinaryCopy.ini&quot;, line;

    /* Aktuellen Pfad ermitteln + Name der .ini Datei */
    getcwd(temp2, 255);
    std::string temp(temp2);
    temp = temp + &quot;\\&quot; + iniName;
    strcpy(curpath, temp.c_str());

    std::ifstream LogFile(curpath);
    if(!LogFile){   /* Wenn die .ini Datei nicht vorhanden ist wird sie erstellt */
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;B083&quot;, curpath);
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;41.30.09.07&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;Y:\\Sources\\ADMIN\\B083.compile&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;C:\\ISS_ENT\\_Versionsdaten&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;Y:\\Sources&quot;,curpath);
    }

    DWORD destSize;
    destSize=500;
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;NULL&quot;,branch,destSize, curpath);
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;NULL&quot;,ver,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;NULL&quot;,compilepath,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string workdir(temp2);
    zielpfad = workdir + &quot;\\&quot;;
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string sourcepath(temp2);
    quellpfad = sourcepath + &quot;\\&quot;;

    /*Compile File einlesen*/
    ifstream infile(compilepath);

    // system(myMkdir.c_str());

    while (getline(infile, line))
        {
        comment = line;

        if (comment[34] == 'Z' &amp;&amp; comment[35] == 'U' &amp;&amp; comment[36] == 'S'){
                i = 1;
            }

        if (comment[29] == 'K' &amp;&amp; comment[30] == 'O' &amp;&amp; comment[31] == 'N'){
                i = 0;
            }

        if (i == 1){
        if ((comment[0] == '/') &amp;&amp; (comment[1] == '*')) /* wenn Entwicklerkommentar am Anfang */
            {
             {  i = 1;
                if (comment[3] == 'K' &amp;&amp; comment[4] == 'U' ||                  /* KU  */
                comment[3] == 'M' &amp;&amp; comment[4] == 'A' ||                      /* MA  */
                comment[3] == 'C' &amp;&amp; comment[4] == 'H' &amp;&amp; comment[5] == 'T' || /* CHT */
                comment[3] == 'T' &amp;&amp; comment[4] == 'I' &amp;&amp; comment[5] == 'N' || /* TIN */
                comment[3] == 'P' &amp;&amp; comment[4] == 'U' &amp;&amp; comment[5] == 'C' || /* PUC */
                comment[3] == 'D' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'A' || /* DOA */
                comment[3] == 'S' &amp;&amp; comment[4] == 'T' &amp;&amp; comment[5] == 'R' || /* STR */
                comment[3] == 'E' &amp;&amp; comment[4] == 'C' &amp;&amp; comment[5] == 'P' || /* ECP */
                comment[3] == 'G' &amp;&amp; comment[4] == 'R' &amp;&amp; comment[5] == 'C' || /* GRC */
                comment[3] == '*' &amp;&amp; comment[4] == '*' &amp;&amp; comment[5] == '*' || /* Formatierung */
                comment[3] == '-' &amp;&amp; comment[4] == '-' &amp;&amp; comment[5] == '-'    /* Formatierung */
                ){/* mach nichts */}
                else  /* wenn es eine Pfadagngabe ist */
                    {

                    i = 1;
                    pathleght = comment.length();
                    pathleght = pathleght - 2;
                    comment.erase(pathleght, 2);
                    comment.erase(0, 3);

                    /* BINARY */
                    if (comment[0] == '$' &amp;&amp; comment[1] == 'b' &amp;&amp; comment[2] == 'i' ||
                        comment[0] == 'B' &amp;&amp; comment[1] == 'i' &amp;&amp; comment[2] == 'n' ||
                        comment[0] == 'B' ||
                        comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S' &amp;&amp; comment[3] == '_' &amp;&amp; comment[4] == 'C' ||
                        comment[0] == 's' &amp;&amp; comment[1] == 'r' &amp;&amp; comment[2] == 'c' ||
                        comment[7] == '$' &amp;&amp; comment[8] == 'b' &amp;&amp; comment[9] == 'i' ||
                        comment[7] == 'B' &amp;&amp; comment[8] == 'i' &amp;&amp; comment[9] == 'n' ||
                        comment[7] == 'B' ||
                        comment[7] == 'I' &amp;&amp; comment[8] == 'S' &amp;&amp; comment[9] == 'S' &amp;&amp; comment[10] == '_' &amp;&amp; comment[11] == 'C' ||
                        comment[7] == 's' &amp;&amp; comment[8] == 'r' &amp;&amp; comment[9] == 'c' ||
                        comment[10] == '$' &amp;&amp; comment[11] == 'b' &amp;&amp; comment[12] == 'i' ||
                        comment[10] == 'B' &amp;&amp; comment[11] == 'i' &amp;&amp; comment[12] == 'n' ||
                        comment[10] == 'B' ||
                        comment[10] == 'I' &amp;&amp; comment[11] == 'S' &amp;&amp; comment[12] == 'S' &amp;&amp; comment[13] == '_' &amp;&amp; comment[14] == 'C' ||
                        comment[10] == 's' &amp;&amp; comment[11] == 'r' &amp;&amp; comment[12] == 'c')
                        {
                            if (comment[0] == 'C' &amp;&amp; comment[1] == 'O' &amp;&amp; comment[2] == 'M' &amp;&amp; comment[3] == 'M' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'N' ||
                                comment[0] == 'C' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n' ||
                                comment[0] == 'c' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n')
                        {comment.erase(0, 7);}

                            if (comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S' &amp;&amp; comment[3] != '_' ||
                                comment[0] == 'I' &amp;&amp; comment[1] == 's' &amp;&amp; comment[2] == 's' &amp;&amp; comment[3] != '_' ||
                                comment[0] == 'i' &amp;&amp; comment[1] == 's' &amp;&amp; comment[2] == 's' &amp;&amp; comment[3] != '_')
                        {comment.erase(0, 4);}

                        if (comment[0] == '$' &amp;&amp; comment[1] == 'b' &amp;&amp; comment[2] == 'i' &amp;&amp; comment[3] == 'n' ||
                            comment[0] == 's' &amp;&amp; comment[1] == 'r' &amp;&amp; comment[2] == 'c')
                            {
                                zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\ISS\\&quot; + comment;
                            }
                        else{
                                zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\COMMON\\&quot; + comment;
                            }

                        quellpfad = quellpfad + &quot;BINARY\\&quot; + comment;
                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;
                        }
                    /* ISS */
                    else if (comment[0] == '$' || comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S')
                        {
                        /* ISS/CFG */
                        if (comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S')
                            {
                            zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\&quot; + comment;
                            quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\&quot; + comment;

                            finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                            quellpfad = sourcepath;
                            zielpfad = workdir;
                            }
                        /* ISS */
                        else{
                            zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\ISS\\&quot; + comment;
                            quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\ISS\\&quot; + comment;

                            finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                            quellpfad = sourcepath;
                            zielpfad = workdir;
                            }
                        }

                    /* COMMON/CFG */
                    else if (comment[0] == 'C' &amp;&amp; comment[1] == 'O' &amp;&amp; comment[2] == 'M' &amp;&amp; comment[3] == 'M' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'N' ||
                             comment[0] == 'C' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n' ||
                             comment[0] == 'c' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n')
                        {
                        zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\&quot; + comment;
                        quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\&quot; + comment;

                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;
                        }
                    /* COMMON */
                    else
                        {
                        zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\COMMON\\&quot; + comment;
                        quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\COMMON\\&quot; + comment;

                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;

                    }
                }
            }
        }
    }
    /* Ordner richtig benennen und ins richtige Verzeichnis verschieben */
    rename = rename + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;ISS&quot; + &quot; ISS_BIN_U&quot;;
    system(rename.c_str());
    rename = &quot;ren &quot;;
    rename = rename + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;COMMON&quot; + &quot; COMMON_BIN_U&quot;;
    system(rename.c_str());
    move = move + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;ISS_BIN_U &quot; + zielpfad + ver;
    system(move.c_str());
    move = &quot;move &quot;;
    move = move + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;COMMON_BIN_U &quot; + zielpfad + ver;
    system(move.c_str());
    del = del + zielpfad + ver + &quot;\\Temp\\&quot;;
    system(del.c_str());

    /* Ausgabe der gefundenen Fehler */
    cout &lt;&lt; &quot;\n************************************************\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;Fehler:\n&quot; &lt;&lt; endl;
    cout &lt;&lt; finalerror &lt;&lt; endl;
    cout &lt;&lt; &quot;\n************************************************\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;Wenn Fehler aufgetreten sind:\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* bei Binary Dateien darf kein ISS oder Common im Pfad vorhanden sein&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* AUSNAHME: Bei Dateien im CFG Verzeichnis&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* Tippfehler&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* liegt die Datei wirklich in dem Ordner?&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* falls der Fehler weiterhin auftritt: Datei einfach per Hand kopieren \n\n&quot; &lt;&lt; endl;

    /* ************************************* /BINARYS NACH COMPILEFILE *************************** */

    cout &lt;&lt; &quot;Beliebige Taste drücken um Fortzufahren\n&quot; &lt;&lt; endl;
    system(&quot;pause&quot;);

    return 0;
    }
}
</code></pre>
<p>und hier die beispieldatei (in .txt speichern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ) :</p>
<pre><code>/* **************************************************************************** */
/* ********************           ZUSÄTZLICH             ********************** */
/* ********************      ZU KOPIERENDE DATEIEN       ********************** */
/* **************************************************************************** */
/* DOA2008 Kommentar kommentar */
/* Test\test.txt */

/* DOA2008 Kommentar kommentar */
/* Test\test2.txt */

/* DOA2008 Kommentar kommentar */
/* Test\test3.txt */
</code></pre>
<p>danke schonmal für eure hilfe!</p>
<p>btw. ich weiss das mein code alles andere als gut ist aber das ist eins meiner ersten projekte...bin also noch am lernen und probieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/234377/programm-funktioniert-nicht</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 11:14:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/234377.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Feb 2009 09:06:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:30:35 GMT]]></title><description><![CDATA[<p>das programm sollte eine textdatei öffnen in der Kommentare und Pfade zu Dateien stehen und unterscheiden was Kommentar und was Pfad ist.... (beides beginnt mit /*)</p>
<p>und anschließend die dateien in die richtigen Ordner kopieren...</p>
<p>eine Beispieldatei ist am ende des Threads</p>
<p>das Programm erstellt beim starten eine .ini Datei in der die Pfade stehen....</p>
<p>ach ja und der teil der am anfang der pfade fehlt ist immer gleich und steht auch in der ini</p>
<p>aber irgendwie funktioniert es nicht...</p>
<p>ich such mir jetzt schon seit 2 tagen nen wolf und komm einfach nicht drauf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>naja hier der code:</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;stdexcept&gt;
#include &lt;string&gt;
#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;direct.h&gt;
#include &lt;windows.h&gt;

using namespace std;

/* ***********************************Function CopyData******************************************** */

/* Error Handling + Kopieren der Dateien + erstellen der Ordner */
string CopyData( string zielpfad, string quellpfad, string error, string workdir, string sourcepath) //Definition einer Funktion
    {
    string myMkdir = &quot;mkdir &quot;, copy = &quot;Copy /Y &quot;;
    /*dateiname aus zielpfad löschen */
    cout &lt;&lt; &quot;\n&quot; &lt;&lt; endl;
    while (zielpfad[zielpfad.length() - 1] != '\\')
        {
        zielpfad.erase(zielpfad.length() - 1, 1);
        }
    char in[255];
    char out[255];
    strcpy(in, quellpfad.c_str());
    strcpy(out, zielpfad.c_str());
    cout &lt;&lt; in  &lt;&lt; endl;
    cout &lt;&lt; out &lt;&lt; endl;
    //lesen
    std::ifstream ifsIn(in);
    std::ifstream ifsOut(out);

    //pruefen
    if (!ifsIn)
        {error = error + quellpfad + &quot;\n&quot;;}
    else if (ifsOut)
        {std::cout &lt;&lt; &quot;Ziel existiert bereits\n&quot;;
        ifsOut.close();}

    else
        {
        //Ordner erstellen und Dateien kopieren
        cout &lt;&lt; &quot;Ordner erstellt&quot; &lt;&lt; endl;
        myMkdir = myMkdir + zielpfad;
        system(myMkdir.c_str());
        copy = copy + quellpfad + &quot; &quot; + zielpfad;
        system(copy.c_str());
        std::ofstream ofsOut(out);
        char c;

        while (ifsIn.get(c))
            ofsOut.put(c);
        //schliessen
        ifsIn.close();
        ofsOut.close();
        }
    quellpfad = sourcepath;
    zielpfad  = workdir;
    myMkdir   = &quot;mkdir &quot;;
    copy      = &quot;Copy /Y &quot;;
    return error;
    }

/* *************************** main *****************************/
int main()
    {
    /*Variablen*/
    char branch[10];       /* Branch  */
    char ver[25];          /* Version */
    //char line[256];        /* Aktuell eingelesene Zeile */
    char compilepath[100]; /* Pfad zum Compilefile */
    int  pathleght;        /* länge des aktuellen Pfades */
    int  i = 0;            /* Hilfsvariable */
    char curpath[50];      /* Pfad der .exe */
    char temp2[512];       /* Zwischenspeicher */
    string comment, quellpfad, zielpfad, error, finalerror, rename = &quot;ren &quot;, move = &quot;move &quot;, del = &quot;rmdir /Q &quot;, myMkdir = &quot;mkdir &quot;, iniName = &quot;BinaryCopy.ini&quot;, line;

    /* Aktuellen Pfad ermitteln + Name der .ini Datei */
    getcwd(temp2, 255);
    std::string temp(temp2);
    temp = temp + &quot;\\&quot; + iniName;
    strcpy(curpath, temp.c_str());

    std::ifstream LogFile(curpath);
    if(!LogFile){   /* Wenn die .ini Datei nicht vorhanden ist wird sie erstellt */
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;B083&quot;, curpath);
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;41.30.09.07&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;Y:\\Sources\\ADMIN\\B083.compile&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;C:\\ISS_ENT\\_Versionsdaten&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;Y:\\Sources&quot;,curpath);
    }

    DWORD destSize;
    destSize=500;
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;NULL&quot;,branch,destSize, curpath);
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;NULL&quot;,ver,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;NULL&quot;,compilepath,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string workdir(temp2);
    zielpfad = workdir + &quot;\\&quot;;
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string sourcepath(temp2);
    quellpfad = sourcepath + &quot;\\&quot;;

    /*Compile File einlesen*/
    ifstream infile(compilepath);

    // system(myMkdir.c_str());

    while (getline(infile, line))
        {
        comment = line;

        if (comment[34] == 'Z' &amp;&amp; comment[35] == 'U' &amp;&amp; comment[36] == 'S'){
                i = 1;
            }

        if (comment[29] == 'K' &amp;&amp; comment[30] == 'O' &amp;&amp; comment[31] == 'N'){
                i = 0;
            }

        if (i == 1){
        if ((comment[0] == '/') &amp;&amp; (comment[1] == '*')) /* wenn Entwicklerkommentar am Anfang */
            {
             {  i = 1;
                if (comment[3] == 'K' &amp;&amp; comment[4] == 'U' ||                  /* KU  */
                comment[3] == 'M' &amp;&amp; comment[4] == 'A' ||                      /* MA  */
                comment[3] == 'C' &amp;&amp; comment[4] == 'H' &amp;&amp; comment[5] == 'T' || /* CHT */
                comment[3] == 'T' &amp;&amp; comment[4] == 'I' &amp;&amp; comment[5] == 'N' || /* TIN */
                comment[3] == 'P' &amp;&amp; comment[4] == 'U' &amp;&amp; comment[5] == 'C' || /* PUC */
                comment[3] == 'D' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'A' || /* DOA */
                comment[3] == 'S' &amp;&amp; comment[4] == 'T' &amp;&amp; comment[5] == 'R' || /* STR */
                comment[3] == 'E' &amp;&amp; comment[4] == 'C' &amp;&amp; comment[5] == 'P' || /* ECP */
                comment[3] == 'G' &amp;&amp; comment[4] == 'R' &amp;&amp; comment[5] == 'C' || /* GRC */
                comment[3] == '*' &amp;&amp; comment[4] == '*' &amp;&amp; comment[5] == '*' || /* Formatierung */
                comment[3] == '-' &amp;&amp; comment[4] == '-' &amp;&amp; comment[5] == '-'    /* Formatierung */
                ){/* mach nichts */}
                else  /* wenn es eine Pfadagngabe ist */
                    {

                    i = 1;
                    pathleght = comment.length();
                    pathleght = pathleght - 2;
                    comment.erase(pathleght, 2);
                    comment.erase(0, 3);

                    /* BINARY */
                    if (comment[0] == '$' &amp;&amp; comment[1] == 'b' &amp;&amp; comment[2] == 'i' ||
                        comment[0] == 'B' &amp;&amp; comment[1] == 'i' &amp;&amp; comment[2] == 'n' ||
                        comment[0] == 'B' ||
                        comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S' &amp;&amp; comment[3] == '_' &amp;&amp; comment[4] == 'C' ||
                        comment[0] == 's' &amp;&amp; comment[1] == 'r' &amp;&amp; comment[2] == 'c' ||
                        comment[7] == '$' &amp;&amp; comment[8] == 'b' &amp;&amp; comment[9] == 'i' ||
                        comment[7] == 'B' &amp;&amp; comment[8] == 'i' &amp;&amp; comment[9] == 'n' ||
                        comment[7] == 'B' ||
                        comment[7] == 'I' &amp;&amp; comment[8] == 'S' &amp;&amp; comment[9] == 'S' &amp;&amp; comment[10] == '_' &amp;&amp; comment[11] == 'C' ||
                        comment[7] == 's' &amp;&amp; comment[8] == 'r' &amp;&amp; comment[9] == 'c' ||
                        comment[10] == '$' &amp;&amp; comment[11] == 'b' &amp;&amp; comment[12] == 'i' ||
                        comment[10] == 'B' &amp;&amp; comment[11] == 'i' &amp;&amp; comment[12] == 'n' ||
                        comment[10] == 'B' ||
                        comment[10] == 'I' &amp;&amp; comment[11] == 'S' &amp;&amp; comment[12] == 'S' &amp;&amp; comment[13] == '_' &amp;&amp; comment[14] == 'C' ||
                        comment[10] == 's' &amp;&amp; comment[11] == 'r' &amp;&amp; comment[12] == 'c')
                        {
                            if (comment[0] == 'C' &amp;&amp; comment[1] == 'O' &amp;&amp; comment[2] == 'M' &amp;&amp; comment[3] == 'M' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'N' ||
                                comment[0] == 'C' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n' ||
                                comment[0] == 'c' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n')
                        {comment.erase(0, 7);}

                            if (comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S' &amp;&amp; comment[3] != '_' ||
                                comment[0] == 'I' &amp;&amp; comment[1] == 's' &amp;&amp; comment[2] == 's' &amp;&amp; comment[3] != '_' ||
                                comment[0] == 'i' &amp;&amp; comment[1] == 's' &amp;&amp; comment[2] == 's' &amp;&amp; comment[3] != '_')
                        {comment.erase(0, 4);}

                        if (comment[0] == '$' &amp;&amp; comment[1] == 'b' &amp;&amp; comment[2] == 'i' &amp;&amp; comment[3] == 'n' ||
                            comment[0] == 's' &amp;&amp; comment[1] == 'r' &amp;&amp; comment[2] == 'c')
                            {
                                zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\ISS\\&quot; + comment;
                            }
                        else{
                                zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\COMMON\\&quot; + comment;
                            }

                        quellpfad = quellpfad + &quot;BINARY\\&quot; + comment;
                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;
                        }
                    /* ISS */
                    else if (comment[0] == '$' || comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S')
                        {
                        /* ISS/CFG */
                        if (comment[0] == 'I' &amp;&amp; comment[1] == 'S' &amp;&amp; comment[2] == 'S')
                            {
                            zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\&quot; + comment;
                            quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\&quot; + comment;

                            finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                            quellpfad = sourcepath;
                            zielpfad = workdir;
                            }
                        /* ISS */
                        else{
                            zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\ISS\\&quot; + comment;
                            quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\ISS\\&quot; + comment;

                            finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                            quellpfad = sourcepath;
                            zielpfad = workdir;
                            }
                        }

                    /* COMMON/CFG */
                    else if (comment[0] == 'C' &amp;&amp; comment[1] == 'O' &amp;&amp; comment[2] == 'M' &amp;&amp; comment[3] == 'M' &amp;&amp; comment[4] == 'O' &amp;&amp; comment[5] == 'N' ||
                             comment[0] == 'C' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n' ||
                             comment[0] == 'c' &amp;&amp; comment[1] == 'o' &amp;&amp; comment[2] == 'm' &amp;&amp; comment[3] == 'm' &amp;&amp; comment[4] == 'o' &amp;&amp; comment[5] == 'n')
                        {
                        zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\&quot; + comment;
                        quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\&quot; + comment;

                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;
                        }
                    /* COMMON */
                    else
                        {
                        zielpfad = zielpfad + ver + &quot;\\Temp&quot; + &quot;\\COMMON\\&quot; + comment;
                        quellpfad = quellpfad + &quot;ISS_&quot; + branch + &quot;\\COMMON\\&quot; + comment;

                        finalerror = finalerror + CopyData(zielpfad, quellpfad, error, workdir, sourcepath); /* Aufruf der function */
                        quellpfad = sourcepath;
                        zielpfad = workdir;

                    }
                }
            }
        }
    }
    /* Ordner richtig benennen und ins richtige Verzeichnis verschieben */
    rename = rename + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;ISS&quot; + &quot; ISS_BIN_U&quot;;
    system(rename.c_str());
    rename = &quot;ren &quot;;
    rename = rename + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;COMMON&quot; + &quot; COMMON_BIN_U&quot;;
    system(rename.c_str());
    move = move + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;ISS_BIN_U &quot; + zielpfad + ver;
    system(move.c_str());
    move = &quot;move &quot;;
    move = move + zielpfad + ver + &quot;\\Temp\\&quot; + &quot;COMMON_BIN_U &quot; + zielpfad + ver;
    system(move.c_str());
    del = del + zielpfad + ver + &quot;\\Temp\\&quot;;
    system(del.c_str());

    /* Ausgabe der gefundenen Fehler */
    cout &lt;&lt; &quot;\n************************************************\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;Fehler:\n&quot; &lt;&lt; endl;
    cout &lt;&lt; finalerror &lt;&lt; endl;
    cout &lt;&lt; &quot;\n************************************************\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;Wenn Fehler aufgetreten sind:\n&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* bei Binary Dateien darf kein ISS oder Common im Pfad vorhanden sein&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* AUSNAHME: Bei Dateien im CFG Verzeichnis&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* Tippfehler&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* liegt die Datei wirklich in dem Ordner?&quot; &lt;&lt; endl;
    cout &lt;&lt; &quot;* falls der Fehler weiterhin auftritt: Datei einfach per Hand kopieren \n\n&quot; &lt;&lt; endl;

    /* ************************************* /BINARYS NACH COMPILEFILE *************************** */

    cout &lt;&lt; &quot;Beliebige Taste drücken um Fortzufahren\n&quot; &lt;&lt; endl;
    system(&quot;pause&quot;);

    return 0;
    }
}
</code></pre>
<p>und hier die beispieldatei (in .txt speichern <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ) :</p>
<pre><code>/* **************************************************************************** */
/* ********************           ZUSÄTZLICH             ********************** */
/* ********************      ZU KOPIERENDE DATEIEN       ********************** */
/* **************************************************************************** */
/* DOA2008 Kommentar kommentar */
/* Test\test.txt */

/* DOA2008 Kommentar kommentar */
/* Test\test2.txt */

/* DOA2008 Kommentar kommentar */
/* Test\test3.txt */
</code></pre>
<p>danke schonmal für eure hilfe!</p>
<p>btw. ich weiss das mein code alles andere als gut ist aber das ist eins meiner ersten projekte...bin also noch am lernen und probieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665115</guid><dc:creator><![CDATA[Masternoob]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:30:35 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:16:07 GMT]]></title><description><![CDATA[<p>Masternoob schrieb:</p>
<blockquote>
<p>aber irgendwie funktioniert es nicht...</p>
</blockquote>
<p>Lerne bitte ausreichende Fehlermeldungen zu verfassen. Was funktioniert nicht, oder verhält sich anders als geplant? Gibt der Compiler Fehlermeldungen oder Warnungen aus (Dann bitte die ersten paar angeben)?</p>
<p>Ich werde mich jedenfalls nicht ohne weitere Angaben durch einen Code kämpfen der<br />
a) vermutlich nicht in dieses Forum passt (ANSI C++, nicht Windows API, für letzteres gibt es ein eigenes Forum)<br />
b) noch recht schlecht lesbar ist</p>
<p>Edit:</p>
<blockquote>
<p>btw. ich weiss das mein code alles andere als gut ist aber das ist eins meiner ersten projekte...bin also noch am lernen und probieren</p>
</blockquote>
<p>Das sollte gerade ein Grund sein noch die Windows API wegzulassen, und erstmal mit C++ vertraut zu werden (Und auch der C++ Standardbibliothek, alleine schon mit std::string &amp; co).</p>
<p>cu André</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665119</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:19:42 GMT]]></title><description><![CDATA[<p>asc schrieb:</p>
<blockquote>
<p>Masternoob schrieb:</p>
<blockquote>
<p>aber irgendwie funktioniert es nicht...</p>
</blockquote>
<p>Lerne bitte ausreichende Fehlermeldungen zu verfassen. Was funktioniert nicht, oder verhält sich anders als geplant? Gibt der Compiler Fehlermeldungen oder Warnungen aus (Dann bitte die ersten paar angeben)?</p>
<p>Ich werde mich jedenfalls nicht ohne weitere Angaben durch einen Code kämpfen der<br />
a) vermutlich nicht in dieses Forum passt (ANSI C++, nicht Windows API, für letzteres gibt es ein eigenes Forum)<br />
b) noch recht schlecht lesbar ist</p>
<p>Edit:</p>
<blockquote>
<p>btw. ich weiss das mein code alles andere als gut ist aber das ist eins meiner ersten projekte...bin also noch am lernen und probieren</p>
</blockquote>
<p>Das sollte gerade ein Grund sein noch die Windows API wegzulassen, und erstmal mit C++ vertraut zu werden (Und auch der C++ Standardbibliothek, alleine schon mit std::string &amp; co).</p>
<p>cu André</p>
</blockquote>
<p>Compiler gibt keine Fehlermeldungen aus...</p>
<p>hab mal n paar Messages eingebaut und anscheined liest das prog nur die erste zeile ein und hört dann auf...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665123</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665123</guid><dc:creator><![CDATA[Masternoob]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:19:42 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:39:03 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>kennst du den Debugger?</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665140</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665140</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:39:03 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:41:04 GMT]]></title><description><![CDATA[<p>chrische5 schrieb:</p>
<blockquote>
<p>Hallo</p>
<p>kennst du den Debugger?</p>
<p>chrische</p>
</blockquote>
<p>.....</p>
<p>ja kenn ich...und wenn er mir geholfen hätte wäre ich nicht hier :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665143</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665143</guid><dc:creator><![CDATA[Masternoob]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:41:04 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 09:59:57 GMT]]></title><description><![CDATA[<p>Weisst Du, wie man den Debugger benutzt?</p>
<p>Mit &quot;Anhalten&quot; und &quot;einen Schritt weiter&quot; sollte man hervorragend ermitteln können, <strong>warum</strong> er nur die erste Zeile einliest (bzw. welche Bedingung für einen Abbruch sorgt).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665161</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 17 Feb 2009 09:59:57 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 10:14:33 GMT]]></title><description><![CDATA[<p>chrische5 schrieb:</p>
<blockquote>
<p>kennst du den Debugger?</p>
</blockquote>
<p>das forum ist sein debugger.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665175</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665175</guid><dc:creator><![CDATA[du BIST es]]></dc:creator><pubDate>Tue, 17 Feb 2009 10:14:33 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 12:04:24 GMT]]></title><description><![CDATA[<p>ok...hab inzwischen was gefunden...</p>
<p>und zwar wird die variable &quot;zielpfad&quot; nicht gefüllt, bzw. nicht aus der ini datei ausgelesen:</p>
<pre><code class="language-cpp">std::ifstream LogFile(curpath);
    if(!LogFile){   /* Wenn die .ini Datei nicht vorhanden ist wird sie erstellt */
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;B083&quot;, curpath);
        WritePrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;41.30.09.07&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;Y:\\Sources\\ADMIN\\B083.compile&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;C:\\ISS_ENT\\_Versionsdaten&quot;, curpath);
        WritePrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;Y:\\Sources&quot;,curpath);
    }

    DWORD destSize;
    destSize=500;
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Branch&quot;,&quot;NULL&quot;,branch,destSize, curpath);
    GetPrivateProfileString(&quot;Allgemein&quot;,&quot;Version&quot;,&quot;NULL&quot;,ver,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Compilepath&quot;,&quot;NULL&quot;,compilepath,destSize, curpath);
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Arbeitsverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string workdir(temp2);
    zielpfad = workdir + &quot;\\&quot;;
    GetPrivateProfileString(&quot;Pfade&quot;,&quot;Quellverzeichnis&quot;,&quot;NULL&quot;,temp2,destSize, curpath);
    std::string sourcepath(temp2);
    quellpfad = sourcepath + &quot;\\&quot;;
</code></pre>
<p>das gleiche mit sourcepath...</p>
<p>hat jemand eine idee woran das liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665223</guid><dc:creator><![CDATA[Masternoob]]></dc:creator><pubDate>Tue, 17 Feb 2009 12:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht... on Tue, 17 Feb 2009 12:56:06 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wo ist der eigentliche Sinn deines Programms?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665240</guid><dc:creator><![CDATA[Sinn]]></dc:creator><pubDate>Tue, 17 Feb 2009 12:56:06 GMT</pubDate></item></channel></rss>