i declared a friend function in one class...as shown below...

classa.h

Qt Code:
  1. class A
  2. {
  3. public:
  4. friend void friendFunction(void);
  5. void somefunction(void);
  6. .................
  7. }
To copy to clipboard, switch view to plain text mode 


classa.cpp
Qt Code:
  1. void class A::somefunction()
  2. {
  3. ......
  4. friendFunction();
  5. }
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. ..........
  2. .............
  3. void frienFunction(void)
  4. {
  5. /* function implementation...*/
  6. }
To copy to clipboard, switch view to plain text mode 





but i'm getting compiler error saying that "friendFunction not declared in this class"
please help me whats the wrong here!??