Questions tagged as 'poo'

1
answer

Can objects have the same name in a class? [closed]

I am starting in the world of programming, I have named two objects with the same name and there is no error. I have a method that instantiates the class with this line: clsDatos objdatos = new clsDatos(); ... and another method that ins...
asked by 16.03.2017 / 19:50
2
answers

assignment of values to compound classes C #

I have the following problem, which may seem a bit silly, but I do not give with the answer. I have the next class public class miClase { public int miId {get; set;} public string miString {get; set;} public tipo1 miTipo1 {get; set;} }...
asked by 10.03.2017 / 21:17
2
answers

Read file (.txt) C ++

My problem is this: void read () { string name, ciudad; int cont = 0; ifstream read; reader.open ("usuarios.txt", ios::out | ios::in); if (lectura.is_open()) { while (!reader.eo...
asked by 19.04.2017 / 20:40
1
answer

PHP (BASIC) Assignment of Object and Class

I have a question ... The following code: <?php $instancia = new ClaseSencilla(); $asignada = $instancia; $referencia =& $instancia; $instancia->var = '$asignada tendrá este valor'; $instancia = null; // $instancia y $refer...
asked by 08.02.2017 / 21:24
1
answer

C ++ POO The variable is not displayed correctly

I am doing a program of collection and payment of basic services in codeblocks This is my code: #include <iostream> #include <cstdlib> using namespace std; class base { private: //bienvenido char nick[30]; //p...
asked by 02.12.2016 / 19:00
1
answer

TypeError: can not multiply sequence by non-int of type 'str'

I am developing a small exercise of the implementation of a class oriented to handling fractions with their respective methods, then I must use it to make a small calculator, the module with the class works perfect and I have tested each of the...
asked by 21.11.2016 / 03:43
1
answer

CreateView does not save in the database with save ()

Yesterday I asked something about the form where they helped me quickly. Today I come, with the same subject, for that form that what I put in that form is not saved in the database and redirects me to the url but you do not show them to me....
asked by 10.08.2016 / 14:40
0
answers

If I make a static object variable, ALL the variables contained in that object become static?

In other words, if I make this variable of the Dog object, all its class variables (properties, such as race, color, namePerror) are also made static together with the object variable "dog"? class ejemplo{ public static Perro perro; }...
asked by 04.12.2018 / 22:58
1
answer

Field String saves as an integer php objects and mysql

I have a update that is done in the following way. public function update_donante($tabla,$caso,$link,$campo,$tipodonante){ $this->tabla=$tabla; $this->caso=$caso; $this->con=$link;...
asked by 15.11.2018 / 11:26
0
answers

Delete all items from a list and add them to another list

I have a method that removes nodes from a list until it is empty. What I need is that after I empty it, I add the elements that I removed to a new list. Here is the method: public void vaciarD(){ while(!estaVacia()){ //mientras que la list...
asked by 12.11.2018 / 07:11