Questions tagged as 'c++'

2
answers

DERIVATIVE class of VIRTUAL class throws the following error: because the following virtual functions are pure within 'name_of_class':

I am working with classes and legacies and I found this first error in a much bigger program than the one I will present to you: undefined reference to vtable for class xxx Trying to recreate the error in a small program I found thi...
asked by 21.04.2017 / 23:30
2
answers

Doubt const to create template

I'm with c ++ learning the templates, but I have a doubt, this code to create templates I understand what it does: template <typename T> T max(T a, T b) { return a < b ? b : a; } But they say that if I want to declare the template...
asked by 28.10.2017 / 02:22
1
answer

Problem when saving in snake game

Hi, I'm new to this c ++ and I was doing a simple snake game I already have almost everything complete the only problem esque I want to do when I lose save the scores and names the file is already created but when the game starts the save functi...
asked by 13.02.2017 / 21:53
1
answer

in the order of mathematical hierarchy gives me 410 and in the compilation of the code gives me 400 what should be the error?

#include <iostream> #include <conio.h> using namespace std; main() { double x = ( 4 * 5 * ( 7 + ( 9 * 3 / ( 2 ) ) ) ) ; cout<<"el resultado de x es: "<<x;// el resultado es 400 getch(); }     
asked by 22.11.2016 / 00:55
2
answers

error in eclipse c ++?

When I create a hello world it works for me but if I paste a block of code from another site I get that error. link this is my code: #include <iostream> #include <cstring> using namespace std; struct Node{ char *name; int...
asked by 15.04.2016 / 01:08
2
answers

Does not save or search data in the C ++ file

The most detailed problem is that when I enter a new student I save it, I look for it and it shows it, but as soon as I enter the second student onwards he throws "Error: DNI Incorrect." Touch any button to return to the previous menu " I do not...
asked by 25.05.2017 / 17:01
1
answer

Code error: lvalue required as left operand of assignment

Why am I getting this: lvalue required as left operand of assignment In this line of code: original[0] = 100; The code I have is this: #include <iostream> #include <queue> #include <list> using namespace std; struc...
asked by 26.11.2018 / 20:47
1
answer

C ++ Can I declare an object of a class as a pair data type?

Can an object of a class be declared as a pair data type in C ++? I have been searching but I have not found much, I have tried to apply it in my code but it does not come out, eg: This is the code: char tag ='A'; point p(p....
asked by 11.11.2018 / 15:27
4
answers

C ++ | question about ranges

I hope you can help me with information to solve this type of problem. They did not give me a topic title or anything like that, only that I tried to solve it. The problem is to request x, initial number, final number x and then add from the...
asked by 15.10.2018 / 23:16
2
answers

Operator overload in C ++

#define TAMSEC 59 #define TAMMIN 59 #define TAMHOURS 23 using namespace std; class Time{ private: int hours, minutes, seconds; public: Time(int hours = 0, int minutes = 0, int seconds = 0); /**Sobre carga operador <<**/ friend ost...
asked by 30.10.2016 / 16:40