Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 657 Bytes

compiler-warning-level-1-c4813.md

File metadata and controls

28 lines (24 loc) · 657 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4813
Compiler Warning (level 1) C4813
11/04/2016
C4813
C4813
c30bf877-ab04-4fe4-897e-8162092426f0

Compiler Warning (level 1) C4813

'function' : a friend function of a local class must have been previously declared

A friend function in an inner class was not declared in the outer class.

The following sample generates C4813:

// C4813.cpp
// compile with: /W1 /LD
void MyClass()
{
   // void func();
   class InnerClass
   {
      friend void func();   // C4813 uncomment declaration above
   };
}