fork download
  1. //constructor
  2. counter = 0;
  3.  
  4. //method
  5. vec_txt.push_back(new QTextBrowser());
  6. ui->stackedWidget->addWidget(vec_txt[counter]);
  7. counter++;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:1: error: C++ requires a type specifier for all declarations
counter = 0;
^
prog.cpp:5:1: error: unknown type name 'vec_txt'
vec_txt.push_back(new QTextBrowser());
^
prog.cpp:5:8: error: cannot use dot operator on a type
vec_txt.push_back(new QTextBrowser());
       ^
prog.cpp:6:1: error: unknown type name 'ui'
ui->stackedWidget->addWidget(vec_txt[counter]);
^
prog.cpp:6:3: error: cannot use arrow operator on a type
ui->stackedWidget->addWidget(vec_txt[counter]);
  ^
prog.cpp:7:1: error: unknown type name 'counter'
counter++;
^
prog.cpp:7:8: error: expected unqualified-id
counter++;
       ^
7 errors generated.
stdout
Standard output is empty