Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8569737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:24:21+00:00 2026-06-11T18:24:21+00:00

I have written some C++ Classes for a console application. How do I use

  • 0

I have written some C++ Classes for a console application.

How do I use these classes in a VCL Forms Application. I am using C++ Builder XE2.

I have added the .h and .cpp files via the Project->Add to project. Do I need to write an include statement? If so, where do I do this?

I tried placing the include statements at the top of the .cpp file, yet I get the following error: Unable to open include file.

I have the .h and .cpp files in the same directory as the Forms project.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:24:23+00:00Added an answer on June 11, 2026 at 6:24 pm

    This is a quick hack. It worked for me.

    Move the entire class you wrote from the .CPP file in to the .H file. Move everything.

    In the .CPP file of the vcl form, form1.cpp, include the .H file that contains the C++ Classes.

    or you could just paste parts of the class methods into form1.h so they become part of the public ref class form1{}; class all together instead of having two different classes clash, the form1 class and your class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simple program that use some classes and procol buffers. These
i have written a library with some classes that make use of qt object
I have written some functions in R using S4 classes. Now I want to
I have written some code that loads an XML document using an XmlDocument object
I have written some code for playing a .wav through my application. Now I
I have 3 classes that I have written some part of them below.when i
I have written some basic c++ programs in one of my classes for school.
I have written some Java classes that do something useful. I'd like to wrap
I have written a few razor helpers and these helpers use functions that include
I have written some classes in C# and compiled it. Now I have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.