Questions tagged as 'c++'

2
answers

Why does not the line feed in C ++ read me?

I do not know why I do not read the line break when I save the names to the file. Thanks in advance, who can help me. (I'm using codeblocks) #include <iostream> #include<fstream> using namespace std; int main() { ofstream m...
asked by 06.11.2016 / 18:55
2
answers

Can not convert an int to struct in c ++

I have a problem with a function that the professor gave us, he did it but at the time of compiling it in Borland he shows me the error "Can not convert 'int' to 'NodoAvl', being NodoAvl the name of the struct. Function code. Function: No...
asked by 02.04.2016 / 22:14
1
answer

What are the leading players in the industry in games? compression? embedded systems? data? [closed]

I learned pointers and I know that it works with memory addresses, I have used it very little, I would like to know if it has any large-scale use?     
asked by 23.02.2017 / 05:36
1
answer

C ++ error: 'bool operator () (std :: pairNode &, float, std :: pairNode &, float)' must be a nonstatic member function

I'm using a priority queue consisting of a pair of an object of a class called Nodo and a value of type float (I chose it instead of double, thinking it takes up less bytes). The error I get is in the comparison operator >...
asked by 09.11.2018 / 15:45
1
answer

c ++ error 'const class std :: vectorNode' has no member named 'find';

I'm using a structure of set that contains a vector , which in turn contains an object of a class called Nodo , when I try to use the function find() of the vector of the stl me There is an error, consider that i...
asked by 13.11.2018 / 00:43
1
answer

He doubts operator overload

I have doubts about the code below: Complejo Complejo::operator+ (const Complejo &c){ Complejo resultado; resultado.real = real + c.real; resultado.img = img + c.img; return resultado; } In this operator, what is...
asked by 18.09.2018 / 21:09
1
answer

Use object class type from GUI,

I'm creating a very simple program with C ++, using the IDE QT creator and I have a question I have a Person class, with two attributes #ifndef PERSONA_H #define PERSONA_H #include <iostream> using namespace std; class Persona { publ...
asked by 24.09.2018 / 13:22
1
answer

Insert and Concatenate Text in a C ++ file

I want to insert multiple lines in a .txt file and read the entire .txt file to validate the inserts, the problem is that it always shows me only one line. I insert text into a function and I send it to call many times. This is my function to...
asked by 04.10.2018 / 22:20
2
answers

Operator overload + in C ++

I can not get the operator +, how can I overload the operator + to add the value of two dice and return an integer with the result? This is the class: class Dado{ private: int dado_; public: Dado(); Dado(int valor); inline int ge...
asked by 23.08.2018 / 21:17
1
answer

Error- no matching function for call to 'getline (std :: ifstream &, int &, std :: string &)' (dev c ++)

I'm with the question of making a phone book. I miss the error that I put in the title, in the line "getline (data, number, name);" (by the way, it is almost at the end indicated with a comment) and I do not know what is due. /*programa para c...
asked by 17.06.2018 / 20:13