Questions tagged as 'c++'

2
answers

C ++ with vectors

Good people asked me to develop a program that allows to print the sum, the product, the maximum and the minimum of 5 whole numbers. I developed it but when I print the smallest I always get it that is 2 (so do not enter the number 2). If you co...
asked by 25.06.2016 / 10:28
2
answers

Failed to work with pointers

char * trocear(int num){ char *salida; int i=0; while(num/10>0){ *(salida+i)=num%10+'0'; num=num/10; i++; } *(salida+i)=num+'0'; i++; *(salida+i)='char *n; n=trocear(123456); cout<<...
asked by 01.12.2018 / 12:33
2
answers

Read Excel data with Qt Creator

I would like to know how I could read the data of an excel from a Qt application. I've tried it with the following code but it reads data without sense. #include <QFile> #include <QStreamText> int main(){ QFile archivo("datos....
asked by 06.11.2017 / 12:17
4
answers

Problem with simple C ++ code

the code must analyze if it is greater or lesser in age, and throw a result on the screen, but it gives an error. #include <stdio.h> using namespace std; int main () { int edad; cin >> edad ; cout << "ingrese s...
asked by 22.08.2018 / 02:35
2
answers

output carrier overload

Given this structure: struct Asignatura{ string nombre; long id; int alumT;//numero de estudiantes que ven la asignatura int semestre; Profesor *prof;//puntero que señala la posicion de memoria del profesor que se le asigno...
asked by 02.08.2018 / 00:57
2
answers

switch with cases of many possibilities

I have a question. switch(car1){ case 'a':cout<<"es la letra A o B\n"; case 'b':cout<<"es la letra A o B\n"; } In this case, is it possible that when the cases are put, when you want car1 to be to or b say the message...
asked by 11.10.2018 / 00:24
2
answers

Combine Arrangements with Enum [duplicate]

I have an enumeration with the months, something like that enum Meses { Enero, Febrero, [...], Diciembre }; I have an arrangement, where I store entire data. Now, what I need to do is something like for (int i = 0; i < n; i++) //...
asked by 21.10.2018 / 19:55
3
answers

Convert QString to char

How do you convert a QString to char ? some easy and understandable way? It's to understand better thanks.     
asked by 11.10.2016 / 23:05
2
answers

I can not get a file integer

Tema.h #ifndef TEMA_H #define TEMA_H #include <string> #include <fstream>** using namespace std; typedef struct{ string title; string intr; int seg; }tTema; bool cargar(tTema &tema); void mostrar(tTema tema); #e...
asked by 03.09.2016 / 14:16
2
answers

error in iostream.h DEV C ++

When I compile my code I get an error    "NO SUCH FILE OR DIRECTORY" Marks it on the <iostream.h> line. Can someone help me solve it?     
asked by 09.06.2017 / 03:09