When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
17 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
yes you can't do that
language doesn't allow it 🤷♂️
then whats a alternative
you can use overloading to have a version of the function with no parameters that calls the one with the parameter.
how
what's unclear?
i forgot abt overloading
well then I'd suggest you revisit that in your book as overloading is a pretty fundamental part of C++
i got it to work i used a overload thingy
class className {
int attr;
public:
void func(int value) {
//some code
}
void func()
{
this->func(attr);
}
};
?
@karmic smelt
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.
no i just had it return the text i htink
think*
!solved