Originally Posted by
jpn
This article should make it clear. Feel free to ask if still in doubt.
Hello jpn,
You didnt get me.
Let me explain...
-->in normal C++
class A
{
.....
};
void func( A &a ) //Is passed by reference
{
}
int main()
{
A a;
func( a );
return 0;
}
class A
{
.....
};
void func( A &a ) //Is passed by reference
{
}
int main()
{
A a;
func( a );
return 0;
}
To copy to clipboard, switch view to plain text mode
-->What I want???
class A
{
.....
};
void func( A a ) //should be forced to pass by reference always. This happens in java
{
}
int main()
{
A a;
func( a );
return 0;
}
class A
{
.....
};
void func( A a ) //should be forced to pass by reference always. This happens in java
{
}
int main()
{
A a;
func( a );
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks