fork download
  1. int main (int argc, char *argv[])
  2. {
  3. QVector<QString> vec;
  4. vec << "xxx" << "yyy" << "zzz";
  5. QVector<QString>::iterator it = vec.begin();
  6. qDebug() << "before loop";
  7. for (; it != vec.end(); ++it)
  8. {
  9. qDebug() << "Element:" << *it;
  10. }
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:5: error: use of undeclared identifier 'QVector'
    QVector<QString> vec;
    ^
prog.cpp:3:13: error: use of undeclared identifier 'QString'
    QVector<QString> vec;
            ^
prog.cpp:3:22: error: use of undeclared identifier 'vec'
    QVector<QString> vec;
                     ^
prog.cpp:4:5: error: use of undeclared identifier 'vec'
    vec << "xxx" << "yyy" << "zzz";
    ^
prog.cpp:5:5: error: use of undeclared identifier 'QVector'
    QVector<QString>::iterator it = vec.begin();
    ^
prog.cpp:5:13: error: use of undeclared identifier 'QString'
    QVector<QString>::iterator it = vec.begin();
            ^
prog.cpp:5:23: error: no member named 'iterator' in the global namespace; did you mean 'operator'?
    QVector<QString>::iterator it = vec.begin();
                    ~~^~~~~~~~
                      operator
prog.cpp:5:32: error: unknown type name 'it'
    QVector<QString>::iterator it = vec.begin();
                               ^
prog.cpp:5:37: error: use of undeclared identifier 'vec'
    QVector<QString>::iterator it = vec.begin();
                                    ^
prog.cpp:6:5: error: use of undeclared identifier 'qDebug'
    qDebug() << "before loop";
    ^
prog.cpp:7:12: error: use of undeclared identifier 'it'
    for (; it != vec.end(); ++it)
           ^
prog.cpp:7:18: error: use of undeclared identifier 'vec'
    for (; it != vec.end(); ++it)
                 ^
prog.cpp:7:31: error: use of undeclared identifier 'it'
    for (; it != vec.end(); ++it)
                              ^
prog.cpp:9:9: error: use of undeclared identifier 'qDebug'
        qDebug() << "Element:" << *it;
        ^
prog.cpp:9:36: error: use of undeclared identifier 'it'
        qDebug() << "Element:" << *it;
                                   ^
15 errors generated.
stdout
Standard output is empty