python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
C++: using-statement of forward-declared class generates error C2371
//A.h
class A;
//A.cpp
#include A.h
class MyA {};
using A = MyA; // error C2371 'A' : redefinition; different basic types
https://ideone.com/Aifxy2
A lot of legacy code uses the class name A.
I wan...

RainingChain
Votes: 0
Answers: 1
How to forward declare a function within the same class?
There is a class A having all the declarations and definitions are placed inside as shown below:
class A
{
void f(); // forward declaration for a lengthy method
...
void g()
{
f(); // c...

HaeRim Lee
Votes: 0
Answers: 1