fork download
  1. #include <cstdio>
  2.  
  3. namespace NNamespace{
  4. struct S{
  5. friend void f(S)
  6. {
  7. puts("hello");
  8. }
  9. };
  10. }
  11.  
  12. int main()
  13. {
  14. NNamespace::S s;
  15. NNamespace::f(s);
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:15: error: ‘f’ is not a member of ‘NNamespace’
stdout
Standard output is empty