Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.55 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Why doesn't scope-resolution work here?
  2. namespace foo
  3. {
  4.     void bar(int) { }
  5.  
  6.     struct baz
  7.     {
  8.         static void bar()
  9.         {
  10.             // error C2660: 'foo::baz::bar' : function does not take 1 arguments
  11.             bar(5);
  12.         }
  13.     };
  14. }
  15.        
  16. static void bar()
  17. {
  18.     using foo::bar;
  19.     bar(5);
  20. }
  21.        
  22. namespace foo
  23. {
  24.     void bar(int) { }
  25.  
  26.     struct baz
  27.     {
  28.         static void bar()
  29.         {
  30.             // error C2660: 'foo::baz::bar' : function does not take 1 arguments
  31.             foo::bar(5); // <-- changed
  32.         }
  33.     };
  34. }