Questions tagged as 'c++'

1
answer

Store functions in classes

I have the following exercise to perform a class that calculates several of the properties of a mathematical function.    Consider a y=f(x) function defined in a [a,b] interval. You want to sample this function. To this end, the...
asked by 09.08.2017 / 14:40
1
answer

How to configure C ++ SFML library in codeblocks or dev c ++?

I have managed to configure the SFML library in codeblocks but once I move the .exe file to another place it does not work anymore. My configuration is as follows: download CODEBLOCK: http://www.codeblocks.org/downloads/binaries download S...
asked by 02.08.2017 / 18:11
1
answer

how to show local web page?

How can I show a local web page? I already did something similar but showing a url, not a local web page (in this way I show the url page m_messageWidget->messageView->setHomepageUrl(QUrl(QString::fromUtf8("urlutilizada").arg(QCoreApplic...
asked by 28.07.2017 / 00:29
2
answers

What does Q_OBJECT do in Qt 5.x

When creating an application with QUI using the Wizard of Qt Creator it creates a class for the window, similar to this: #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> class MainWindow : public QMainWindow { Q_OBJ...
asked by 03.08.2017 / 15:59
1
answer

Invalid conversion from 'int' to 'Class **'

I'm doing a program that orders a list of 3 different ways (by selection, bubble and shell method). I get the following error Invalid conversion from 'int' to 'Animal**' and void value not ignored as it ought to be in these lines...
asked by 14.07.2017 / 16:55
1
answer

Help with Qt creator, does not allow to run projects?

I have installed the qt creator several times but it had never cost me as much as in my current pc; first I used the installer that I always had in my pendrive (the one of qt 5.8), it told me that I could not download certain repositories, I...
asked by 30.06.2017 / 05:23
1
answer

Error 'can not bind' std :: ostream 'when deploying a template in C ++

WHEN modifying a TAD with templates to make it generic (add templates): For data entry / exit I have this code: std::ostream& operator<<(std::ostream& os, Matriz & m) { os << m.filas() << " " &l...
asked by 25.06.2017 / 00:32
2
answers

C2780 when using the STL copy algorithm

Greetings, I'm trying to design a "copy constructor", everything was fine until I came up with the copy algorithm and I have obtained a C2780 because apparently it only recognizes 2 of 3 arguments for copy ... #include<iostream> #include...
asked by 24.06.2017 / 23:57
2
answers

C ++ - Problems with Char variable input

I am trying to record a series of data in a struct in c ++. However, I have the problem that the field "activepolicy" (what should have only V and F) does not take the values I want: Saves those from the subsequent field. I think it's a problem...
asked by 31.08.2017 / 04:58
1
answer

Run repeated tests reported as different tests

I would like to do unit tests of a function with different expected inputs and outputs. My function is irrelevant, so instead I will use an example function that counts English words with the following cadidata implementation: int countEngl...
asked by 02.06.2017 / 10:35