Questions tagged as 'sobrecarga'

2
answers

Overloading C ++ operators, is the auxiliary variable necessary in this case?

I'm studying through the book Introduction to Object Oriented Programming with C ++ (Antonio Mendes da Silva Filho), and I implemented an example of it as follows: #include <iostream> using namespace std; class Contador{ public:...
asked by 03.01.2017 / 16:17
2
answers

How to implement operator overload and in C ++?

Hello, I'm doing an exercise that consists of the following statement: Sorryforputtingaprint,butIcouldnotselectthetextanditwouldbeanunnecessaryjobtotypeeverythinghere.Finally,Imadetheclassandimplementedtheoverloadofthe+,-,*and/operators,butI...
asked by 02.01.2017 / 22:01
1
answer

How to run the same php script via cron without overloading?

What is the best way to run a same php script multiple times by doing random queries for a given column with a limit of 1000 per query of the same mysql table via cron (cpanel) without generating so much overhead? [cron 1] * * * * *...
asked by 17.07.2016 / 03:59
2
answers

PHP builders [closed]

Can not create 2 constructors for a class. How do I instantiate a class and use its functions without having to create a new object? In C #, for example, I use an empty constructor and I can still use one with parameters.     
asked by 14.06.2018 / 19:25
1
answer

How to copy the summary of a method with Overload in C #

I'm creating an application where in classes I have a series of overload 's to optimize performance and flexibility. Ex: public class Calc { // método original com sumário /// <summary> /// soma "a" com "b" /// </s...
asked by 21.06.2018 / 16:05
1
answer

Operator overload ==

bool Stock::operator== (const Stock& stk){ if ( this->get_resource() == (stk.get_resource()) ) return true; else return false; } I created this method to overload the operations of a class, however, when I instantiate pointers...
asked by 20.02.2017 / 01:36
0
answers

How to run Thread with Function overload?

In the code below I have a problem trying to run a thread using function overload. It's like std::thread does not understand overhead. Noinstanceoftheconstructor"std :: thread :: thread" matches the list of arguments. Does anyone k...
asked by 04.08.2018 / 04:55
1
answer

How to create overload in PHP by means of variadic-function?

Here's my problem: For reasons of debug I decided to create a function that would return me a% formatted format without the need for a gambiarra (ie , without creating the print_r . That way, I would transform this: <?php...
asked by 17.11.2017 / 18:38
1
answer

Make operator overload by separating statement (.h) from definition (.cpp)

I'm trying to separate the class implementation definition into separate files, however I'm getting undefined reference in ; operator. What I've tried: Change the order of objects at link time: only generates an undefined reference i...
asked by 29.09.2016 / 18:41
3
answers

Error trying to make operator overload with dates [closed]

I'm trying to overload operators for dates, but if I use a double overhead it gives error. What I actually want to do is that if the user uses a separator setting a format it accepts and if the user does not use it get the default format defi...
asked by 07.07.2017 / 23:56