Questions tagged as 'poo'

1
answer

In the overload of, it says that there is an initializer error before &

#include <iostream> #include <cstdlib> using namespace std; class vector { private: int *pv, tam; public: vector (int *a, int tam){ pv= new int [tam]; for (int i=0; i<tam; i++){ pv[i]=a[i];...
asked by 11.08.2018 / 21:17
1
answer

Problem with global variable

I am preparing an exam and I have been doing several exercises, the problem arises when I get to the part of object-oriented programming (OOP) in this exercise:    Write a class that allows you to represent the character of a video game.   A...
asked by 18.02.2018 / 21:06
1
answer

Improve method to return a priority value within a list

I'm designing a view that shows the location of some boxes in an inventory, I'll put it in an image here In each box the first data is the part number, the second is the amount of things you have and the third is the priority in which they...
asked by 08.02.2018 / 23:43
1
answer

Error with fetch_assoc MYSQLi

I come to you since I am stuck in an object-oriented MySQLi function. I try to get the ID (A_i) of the corresponding tokens of the users, in a table called Tokens. The problem is that it does not give errors and also returns an empty result....
asked by 25.10.2017 / 21:21
2
answers

Java Programming (Basic POO: Exception in thread "main" java.lang.NullPointerException)

I copy and paste (it seems to me more comfortable than an image) the code. package nueve; import java.util.Scanner; public class nueve { Scanner sc = new Scanner (System.in); private int arreglo; private int AñoEdad=2017; priv...
asked by 31.05.2017 / 01:12
1
answer

What do the entity, control and interface classes refer to?

How far I have understood the entity classes are those that are used to model the data, for example create a Person class that groups all its attributes. The control classes are more than responsible for performing what the user wants. The...
asked by 27.02.2017 / 00:55
1
answer

fatal error call to a member function prepare () on boolean in functions.php online 32

I am making a news system that is perfect in apache and in an online server. This error arises when running the site on a local server windows iis can be the php versions? has the 5.6 $bd_config = array( 'basedatos' => 'noticias',...
asked by 13.02.2017 / 15:36
1
answer

Error using a constructor in python 2.7

I was doing an object-oriented python 2.7 work, I'm quite new to python, and when I run the code it notifies me of the following error: I am instantiated the object and then serialize it with the "Pickle" module and save it in a file as...
asked by 18.03.2017 / 23:18
1
answer

Use of instance attribute inherited from parent class

I have the following code: from PyQt5.QtWidgets import QMainWindow,QApplication from PyQt5 import uic class Primera(QMainWindow): def __init__(self): QMainWindow.__init__(self) uic.loadUi("Inicio.ui",self) self.pr...
asked by 01.08.2018 / 05:52
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