TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karthik Agarwal
NA
748
266.5k
How to use forward declaration of class from different namespaces?
Feb 15 2012 4:23 AM
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.
Reply
Answers (
10
)
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