Apparently, call a method retorna() -- inside of the class d_figura3 -- from an object instantiate to class d_figura2 is not the best way to go.
So, I will explain right exactly what I need, in...
Type: Posts; User: tharnier
Apparently, call a method retorna() -- inside of the class d_figura3 -- from an object instantiate to class d_figura2 is not the best way to go.
So, I will explain right exactly what I need, in...
hmmmm, I could do that.
But, if I do so, i.e., inside of d_figura2 declare: friend d_figura3.
How should I acces retorna() from the object minhafigura2 ?
what is the line command?
Thanks
yes you are right. but I wasn't enough clear about my intentions.
I dont want to create an object as: ' d_figura3 minhafigura3; '
I want to acces the method retorna() --- inside the class...
Cosider this little program:
#include <iostream>
using namespace std;
class figura {
public:
Ok, thank you all your attention and patient to my problem!!!!
No no, not about boost... about c++, but not too beginer, I say intermediate!!!!
Ok, and how about the book???
Can you suggest one??
To look up that kind of doubt?
What probably will solve my problem is:
ExClass f;
f.func = boost::bind( &ExClass::func, &f );
example( f.func );
isn't?
But, do I really need to install all boost library to use...
hmmmm that is what I was trying to avoid...
But I'm trying to use boost::function...
Do you know some really good book to indicate to me??? with this kind of doubt
I cant read this because its looked...
And, I cant see but when I am compiling that, its returning a error:
In function ‘void example2(Class_t&, Fnc_t) [with Class_t = ExClass, Fnc_t = int...
I think that will work. But I'm just taking my time to understand the code....
Thank you everyone.
ow yeah, I think you really helped me right here!!!
Broydn is a root finder, you're right. And you let my problem clear; I need that Broydn be able to get an object from my class ExClass.
But how...
hmmmm, sorry if I was not clear. I think this explain why I couldn't do:
int main(){
ExClass f, *p=&f;
p -> func;
...
}
I'm intending to use a 'ready' function, Broydn, from 'Numerical Recipes Book". And that function, Broydn, calls aother function by reference. For example:
template <class T>
void Broydn( T...
Hi, I'm having a problem in pass a function as argument to another function.
This call is made by reference, and the function called is declared into a class.
A example of my problem is:
...