Questions tagged as 'c++'

1
answer

Error message when compiling a struct array as an attribute

I do not know how to create an attribute of type struct array. I leave my codes, I get this error: In classAntena.h it says 'cellular' was not declared in this scope. In classAntena.cpp it says 'Cell phones' does not name a type. classAnte...
asked by 29.03.2016 / 02:02
1
answer

Problem executing c ++ code in Netbeans "Debugger error: During startup program exited with code 0xc0000139."

I am programming a simple code in C ++ with NetBeans. The code compiles me well in NetBeans and in other environments (Dev C ++) it works. However, when running in Netbeans I get the following error:    RUN FAILED (exit value -1.073.741.511,...
asked by 12.07.2016 / 09:50
2
answers

How to do so that he does not repeat a clue and tell me to put another clue

#include <iostream> #include <cstdlib> #include <conio.h> #include <math.h> using namespace std; int compare(const void * a, const void * b) { if (*(int*)a < *(int*)b) return -1; if (*(int*)a == *(int*)b) ret...
asked by 17.12.2018 / 22:49
1
answer

I can not get the values of an array by method of the initialized object

Good greetings, I have problems with recovering the values stored in the array, the drawback is that I'm not sure if double Nota::getNotas() and void Nota::inicializa() , are correct. class Nota { public: Nota();...
asked by 03.09.2016 / 04:27
2
answers

Print all the vector by C ++ screen

Good evening friends. I have never considered this operation and I do not know how to solve it, it turns out that I have a vector to which I have done a series of operations but I need to verify that all of them are fine. The only way I can thin...
asked by 13.04.2017 / 23:53
1
answer

Qt - Serial port on windows responds but on linux no!

I resort to you because I have a problem reading the serial port. It turns out that my demo runs correctly on windows but I do not get any kind of answer on linux. The device to which I connect is an antenna, to which you must send the command "...
asked by 07.11.2018 / 17:46
2
answers

Double lists c ++

#include <iostream> using namespace std; struct Nodo{ int nro; Nodo *ant; Nodo *sgt; }; void insertarListaFinal(Nodo *&lista, int valor){ Nodo *q= new Nodo(); Nodo *t; q->nro=valor; q->ant=NULL;...
asked by 10.10.2018 / 05:06
1
answer

Compare strings in C ++

I am learning c ++ and the truth is that I do not find the solution to my problem: I want to create a program that asks for name and age, and that in case you enter the correct name (Dan), one thing comes up, and if not, then another one. #...
asked by 03.10.2018 / 21:40
1
answer

Given 2 lists generate 2 new lists with the elements that are in both and with those that are only in one

Given two ordered lists L1 and L2 , write a function: void bool_opers(list<int> &Lxor, list<int> &Land, list<int> &L1, list<int> &L2); The algorithm must generate in Lxor a new sorted list wit...
asked by 05.09.2018 / 16:31
1
answer

How can I use an implementation of an interface, only including the .hpp of the interface?

Main.cpp #include <iostream> #include "IWrittingDevice.hpp" #include "IFactory.hpp" int main(int argc, char const *argv[]) { IFactory* factory = 0; IWrittingDevice* device = factory->create(0); device->Write(); de...
asked by 30.08.2018 / 14:23