Sista
Sista

Reputation: 887

Parsing a file in C++

I am stuck in a project that I am working on. Since I have limited C++ knowledge, I would appreciate some help.

I had created a project in C++ in which I had defined many structs. Now I want to use these structs for a different project. I want to be able to get a possible interface for these structs and store it in a file called parse_file.

How can I do this? In my new project, where should I insert the code for creating this interface?

Thank you for your help.

Upvotes: 0

Views: 194

Answers (1)

Christopher Armstrong
Christopher Armstrong

Reputation: 7953

The easiest solution would be to declare the structs in a header file, and then include this header file in both projects.

Upvotes: 3

Related Questions