Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
10
Answers
How to use forward declaration of class from different namespaces?
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Karthik Agarwal
12y
4k
1
Reply
Hi,
I have something similar to the following post, if not may be an extension
http://www.c-sharpcorner.com/Forums/Thread/154204/how-to-pass-a-string-from-one-form-to-another.aspx
I have a namespace1 where i am instantiating the class in namespace2.
I have also included the header file and namespace2 i.e the class i have instantiated in namespace1 in 3 different places in namespace1 but what i need now i want to access properties of 2 different classes which are there in 3 header files where i have already included the namespace2 and the header file in as well.
This is just like including one header file1 in header file2 and vice versa which is not allowed which makes it a loop. Hence i tried forward declaration of the class in namespace1 which has access to the other two classes and properties and thought of using the same in namespace2 where i have not succeeded or need more support to work on.
Post
Reset
Cancel
Answers (
10
)
Next Recommended Forum
How to create a dll based on the c code in vc++?
How to use random read and write the suffix name for ".txt" file data block