Questions tagged as 'c++'

2
answers

Investment program with tabulation table and one or two dimensional arrays

It is a school exercise on the use of c ++ fixes, although I can not understand how to make the exercise show tabulation of the month and the accumulated total and the total accumulated profit at the end of the term. --------------------------...
asked by 30.08.2018 / 06:38
1
answer

Challenge of purchases with 4 and 7

You have a list of computer brands and their price. You need to determine if the price of each brand has the same number of "4" s and "7" s. If this happens, then the name of the brand is returned. Otherwise, "-1" is returned. If there are two o...
asked by 24.10.2018 / 05:33
2
answers

C ++: Casting from a parent class to a daughter?

I have two classes lib_array_list that inherit from lib_object : class lib_array_list : public lib_object { size_t len; size_t sizememory; lib_object** objs;//es un array que cada tipo es de lib_object std::string...
asked by 31.07.2018 / 18:37
1
answer

How to order a list of objects?

I need help with this. I have a list in which I must store the information of the taxi drivers, in one of the functions I must print a report of taxi drivers who worked overtime, ordered in descending order. I have seen several examples on the i...
asked by 28.11.2018 / 23:00
2
answers

Error; The left operand must be L-value

I have to build a doubly linked list, but I was presented with an error that I can not solve: Node class It is important to note that this class makes use of template to accept any format. #ifndef nodo_h #define nodo_h #include &l...
asked by 15.08.2018 / 04:30
1
answer

Error: std :: out_of_range

I'm having this problem, the program compiles and links, but at the time of executing I throw this bug, if someone could give me a hand.    ~ / Projects / Queue using vector # ./main terminate called   after throwing an instance of 'std :: ou...
asked by 09.07.2018 / 20:12
1
answer

Doubt about INADDR_ANY

I am working on a project in which I want to communicate a computer with a Raspberry Pi using the UDP communication protocol. My doubt comes at the time of declaring the IP address. I have read on some pages that this applies to all local interf...
asked by 27.05.2018 / 02:59
1
answer

Subtract a string

I'm doing a project for the university that involves object oriented programming . I must create objects (with value string ) and add them, subtract them and multiply them. My problem is in subtraction. I'm supposed to iterate between eac...
asked by 14.05.2018 / 08:23
1
answer

Read from a delimiter in a file

You see, I'm reading an xml file where each entry has the following format: <BatchIdentifier>[ID_FACTURA]</BatchIdentifier> I capture each line in the file with: string line; while(getline(plantilla,line,'\n')){//PARA HACER L...
asked by 21.04.2018 / 13:40
2
answers

How to define a private function

Someone could tell me how I should define a private function in c ++. I have this class definition. #ifndef AUTHOR_H_ #define AUTHOR_H_ #include <string> #include <iostream> using namespace std; class Author { private: strin...
asked by 23.04.2018 / 22:37