Questions tagged as 'c++'

2
answers

Error compiling a template

I was asked to put together a project to make a list of nodes with double links, these nodes must be able to accept any type of format ( char , int , float ) for this I use the templates. However, there is an error that I do...
asked by 14.08.2018 / 04:31
3
answers

Visual Studio 17 vs Code :: Blocks 17

Very good to all:). I have the following code to check if two objects in a list of pointers to a class Objeto are in the same position (x, y) and if they are, delete one of them. It works perfectly in Code :: Blocks 17 but in Visual St...
asked by 17.01.2018 / 14:02
1
answer

Why does not qobject_cast work in this class?

This is the class ... I think I do not omit anything important: class CambiaValorCommand : public QUndoCommand { public: CambiaValorCommand(const QModelIndex &indiceAntiguo, const QModelIndex &indiceNuevo, const QVariant &...
asked by 14.09.2017 / 11:39
1
answer

Display huge texture

Greetings, I am working on a program developed in C ++, using QT and GDAL. The program now is able to show textures but if these are larger than 16384x16384 pixels I get the following error:    GLI | GL ERROR - Function glTextureStorage2DE...
asked by 29.09.2017 / 09:33
2
answers

c ++ error expected initializer before 'void' when compiling main [closed]

I have a doubt with a class in which I implement a vector with all its functions, what happens is that when compiling, in the main I get an error that I do not understand, I have reviewed my code and I can not find an error. This is th...
asked by 09.02.2018 / 01:07
1
answer

Make QT applications for 64 bits

I have a question, I am experimenting with Qt C ++ and I downloaded the Qt Creator from the recommended online installer. At first I did not install MinGW, so it was a delivery to configure the compiler, I gave up, I installed MinGW and the QTCr...
asked by 19.07.2017 / 19:08
1
answer

How to send ASCII codes to a serial port and read as bytes or characters? - C ++

In the following code I can send characters and read the bytes of these. But what should I add, delete or modify so that only the codes are sent? ASCII and to read the bytes without having to add the line char bytes_to_send[] = "hello"; ?...
asked by 17.07.2017 / 03:15
2
answers

Stacks with fixes in c ++

I need to make a code that meets these conditions: I already made the program using linked lists: #include<iostream> using namespace std; struct nodo{ int dato; nodo *sig=NULL; }; void apilar(nodo *&inicio,int x);...
asked by 24.07.2017 / 17:27
4
answers

Convert a double to char [32]

I have a variable of type double: double p = 32.121; and I want to save it in another variable of type char[8]: char j[8]= ""; . I'm working with VC++ 2008 and C++9 . I have tried with the own functionality of...
asked by 04.07.2017 / 10:00
1
answer

Problem when compiling Invert content from a list

I've done a list exercise that does not work out for me, it's this:    Develop the template method <class T> void dll_t<T>::invert(void) that reverses the order of the values of a list on itself (without using auxiliary...
asked by 27.07.2017 / 10:56