Quote Originally Posted by jpn View Post
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++
Qt Code:
  1. class A
  2. {
  3. .....
  4. };
  5. void func( A &a ) //Is passed by reference
  6. {
  7.  
  8. }
  9. int main()
  10. {
  11. A a;
  12. func( a );
  13. return 0;
  14. }
To copy to clipboard, switch view to plain text mode 

-->What I want???
Qt Code:
  1. class A
  2. {
  3. .....
  4. };
  5. void func( A a ) //should be forced to pass by reference always. This happens in java
  6. {
  7.  
  8. }
  9. int main()
  10. {
  11. A a;
  12. func( a );
  13. return 0;
  14. }
To copy to clipboard, switch view to plain text mode