0

Hi this is my straight forward question, because i dont know how to explain my question with some example.

Question:

How to deal with namescpaces in forward declarations where classes are defined in different namespaces?

if anyone feel this is duplicate of any other question or this is not right way to ask this question means also comment over here. Thanks in advance....

nagarajan
  • 474
  • 3
  • 21
  • Maybe you should explain the *problem* you're having with forward-decls in namespaces and update your question accordingly. "How to deal with them" is only slightly less nebulous than "it don't work". – WhozCraig Feb 11 '15 at 11:01
  • This question fired to me by one of team met, more over i am new to c++, so only posted directly over here. Along with this i am studying about namespace now. – nagarajan Feb 11 '15 at 11:03
  • 1
    [Related post](http://stackoverflow.com/questions/2059665/why-cant-i-forward-declare-a-class-in-a-namespace-like-this). – iammilind Feb 11 '15 at 11:06
  • Then ask *them* for the specific problem they're having. – WhozCraig Feb 11 '15 at 11:07

1 Answers1

1

Forward-declare the class in the namespace:

namespace SomeNamespace
{
    class ForwardDeclaredClass;
}
Luchian Grigore
  • 253,575
  • 64
  • 457
  • 625