Questions tagged as 'poo'

1
answer

Class to load scripts and css in PHP [closed]

I need a method to load css and javascript files dynamically on each page, so as not to load unnecessary files and improve performance. Create a class in php that works, but I want to know if there is a better method. I do not use any PHP framew...
asked by 12.02.2017 / 21:40
1
answer

Mutable data member in C ++

Good morning everyone, to see if you remove the doubt. A constant function in theory is only used with const data members that do not modify the object, that is, this function will access a const data member but as I am looking at it, when we...
asked by 11.01.2018 / 23:37
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
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
1
answer

Error obtaining properties of a [duplicate] object

I'm starting in the world of POO with PHP. When accessing the properties of the object Persona through a getter, its corresponding value does not appear. The class code is as follows: <?php class Persona{ public $nom...
asked by 29.08.2017 / 12:46
2
answers

Error inserting records with PDO in php

Well I have the following error, that when I try to register data in the database I get the following error    Error: SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresp...
asked by 08.04.2018 / 06:19
2
answers

Doubt with POO exercise in Java - problem with array

I have a question with an exercise that says: Create a Book class with loan, return and toString methods. I want the vector to grow as the number of books grows, but in codigo.length , codigo appears as not being initialized. Wha...
asked by 03.03.2018 / 23:39
1
answer

List by DNI - Asp.net mvc 4 db Access

I am programming in ncapas, asp.net mvc 4 bd Access and what I need is to list a data by your ID that I sent to you. If you arrive but do not filter. I still list all the info. This is my code. public List<TAsistenciaDTO> ObtenerAsistenc...
asked by 19.01.2018 / 00:08
2
answers

Doubt about Polymorphism

I have an Abstract class Vendible (with attributes name, price and identifier) and two classes that inherit from it Products and Package, Package is going to be formed by an array of products and the advantage is that it has a discount of 20 % o...
asked by 03.12.2016 / 00:52
1
answer

How to make an arrangement of objects within another class? c ++

I need to make an arrangement of size 10 objects within a different class, The only way I know how to do it is this: (B is another class) class A { private: B arreglo[10]; public: A(); A(string, int, B arreglo[10]); }; T...
asked by 19.09.2018 / 20:30