Questions tagged as 'c++'

0
answers

expected token How can I fix that problem?

When I add this to my code: while (std::getline(file, str, '\n')) { istringstream iss(str); vector<string> line; copy(istream_iterator<string>(iss), istream_iterator<string>(), back_inserter(line)); counter = 0;...
asked by 27.05.2017 / 06:30
1
answer

What I need is that when the character collides with the door jump to the next level, how do I do this?

This is one of the levels, it is declared as global. String Capitulo_1[] = { "OTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTO", "P p", "P p", "P p", "P...
asked by 25.05.2017 / 04:11
3
answers

Error in basic code c ++. "Name of the variable" was not declared in this scope

I am learning C ++ and the error that appears in Eclipse is:    "Name of the variable" was not declared in this scope In the document.h I have declared the variable m_nomLocal , so I do not know what you can refer to. In th...
asked by 12.03.2017 / 21:39
1
answer

Return of a function a dynamic C ++ matrix

I have a function that performs some operations dynamically creating in its response a vector and a size matrix that depends on its inputs. The problem and the basis of my query is that I have been able to get back the vector that is generate...
asked by 01.06.2017 / 14:46
1
answer

.h and .cpp with array of structures

Good, I need to create a header with an array of structures and a .cpp where the methods are implemented, and it has to have a struct, and create an array of that struct, and then from another file create that array and make the operations with...
asked by 16.05.2017 / 17:13
2
answers

Why do not I get the values of the .ini file loaded in the corresponding layout?

Login::Login(QWidget *parent) : QWidget(parent) { qsettings=new QSettings(QString(":/config/config.ini"), QSettings::IniFormat); Login::setWindowModality(Qt::ApplicationModal); Login::setWindowIcon(QIcon(":/config/images/logos/login.png"));...
asked by 16.05.2017 / 18:38
1
answer

problem calculation bit to 1 first position and last position

I'm struggling a bit with an exercise, develop the method int first_item (void) should return the index of the first element of the set. The int last_item (void) method must return the index of the last element in the set. I am blocked there,...
asked by 13.05.2017 / 23:54
1
answer

Segment violation, problem in pointers or dynamic memory?

Good I was trying to practice with vectors with dynamic memory and I got this error when executing: Violación de segmento ('core' generado) The fact is that sometimes it works, so it leaves me a little confused, this is my code: #...
asked by 21.05.2017 / 19:34
1
answer

How can I do so after saving it as CSV I open the file automatically

void MainWindow::on_btnExcell_clicked() { QString done= ""; tableView->setModel(mModel); QString path=QFileDialog::getSaveFileName(NULL,"Convertir a CSV","file","CSV(*.csv)"); if(path.isEmpty())return; QFile file(path);...
asked by 15.05.2017 / 12:40
0
answers

C ++ data sample

Thanks to my colleague Silvio Colman, I have been able to reorganize my exercise, and mount the project well now the part where if I have an error is in: Calculate the number of elements that are in a range within the orderly sample (for exam...
asked by 09.05.2017 / 07:21