Fehler: expected unqualified-id before 'für'

Den folgenden code gibt: error: expected unqualified-id before ‘for’

Kann ich nicht finden, was den Fehler verursacht. Vielen Dank für die Hilfe!

#include<iostream>

using namespace std;

const int num_months = 12;

struct month {
    string name;
    int n_days;
};

month *months = new month [num_months];

string m[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", 
              "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int n[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

for (int i=0; i<num_months; i++) {
    //will initialize the months
}

int main() {
    //will print name[i]: days[i]
    return 0;
}
Unabhängig von Ihrem Problem, aber immer noch sehr wichtig, ist, dass Sie eine "neue", aber Sie sind nie Anrufe "löschen", die Speicherverluste.

InformationsquelleAutor Morlock | 2010-02-19

Schreibe einen Kommentar