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

  • Home
  • SEARCH
  • 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 8550941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:04:56+00:00 2026-06-11T14:04:56+00:00

I am using C++ Builder. I have coded two classes in a console application

  • 0

I am using C++ Builder. I have coded two classes in a console application and I want to use these classes in a VCL form application.

How do I do this? Do I have to split them into .cpp and .h files and then include them? Or is there another way?

UPDATE

Here is my code:

class appointment
{
public:
    appointment();
    appointment(string aName, TDateTime aDate, TDateTime aReminderDateTime, string aType,
    string aLocation, string aComments, bool aIsImportant)
    {
        appName = aName;
        appDateTime = aDate;
        appReminderDateTime = aReminderDateTime;
        appType = aType;
        appLocation = aLocation;
        appComments = aComments;
        appIsImportant = aIsImportant;
    }
    void setAppName(string aName)
    {
        appName = aName;
    }
    void setAppDateTime(TDateTime aDateTime)
    {
        appDateTime = aDateTime;
    }
    void setappReminderDateTime(TDateTime aReminderDateTime)
    {
        appReminderDateTime = aReminderDateTime;
    }
    void printAppointmentDetails()
    {
        cout << "Appintment Date: " << appDateTime << endl;
        cout << "Appintment Reminder Date: " << appReminderDateTime << endl;
        cout << "Appintment Type: " << appType << endl;
        cout << "Appintment Location: " << appLocation << endl;
        cout << "Appintment Comments: " << appComments << endl;
        if (appIsImportant)
        {
            cout << "Appintment IsImportant: " << "Yes" << endl;
        } else {
            cout << "Appintment IsImportant: " << "No" << endl;
        }
    }
    void setAppType(string aType)
    {
        appType = aType;
    }
    void setAppLocation(string aLocation)
    {
        appLocation = aLocation;
    }
    void setAppComments(string aComments)
    {
        appComments = aComments;
    }
    void setAppIsImportant(bool aIsImportant)
    {
        appIsImportant = aIsImportant;
    }
    string getAppName()
    {
        return appName;
    }
    TDateTime getAppDateTime()
    {
        return appDateTime;
    }
    TDateTime getAppReminderDateTime()
    {
        return appReminderDateTime;
    }
    string getAppType()
    {
        return appType;
    }
    string getAppLocation()
    {
        return appLocation;
    }
    string getAppComments()
    {
        return appComments;
    }
    bool getAppIsImportant()
    {
        return appIsImportant;
    }
private:
    //appointment();
    string appName;
    TDateTime appDateTime;
    TDateTime appReminderDateTime;
    string appType;
    string appLocation;
    string appComments;
    bool appIsImportant;
    //person owner;
};

I know that with strings, the following is used in .cpp files:

const std::string& exampleString

Is the same context used when talking about TDateTime data types? If so, can you please give me an example of how to use them?

  • 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-11T14:04:57+00:00Added an answer on June 11, 2026 at 2:04 pm

    It is hard to say without seeing how they are integrated within your code but certainly there is no harm in creating separate source and header files for each class and including them in the new project. You can then use those same files included within your existing console application also. It is certainly not a bad practice to do this.

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

Sidebar

Related Questions

I have an application written using C++ Builder 5 that uses the TDocument class.
I have created a UISegmentedControl with two segments using the interface builder (from storyboard),
I have created some custom JPanel classes using the NetBeans GUI Builder. Next, I
I have two static methods that I want to use for error handling. One
Hi, I have been working on a Flex Mobile application using Flash Builder 4.6.
Friends i'm using string builder for generating Passenger List in which i have used
I have a problem with a report that is build using report builder 2.0,
I'm using Flash Builder 4 Beta 2. I have it connecting to a PHP
I am using Borland C++ Builder 6. I have installed LMD Tool version 7,
I have been using Sandcastle Help File Builder to produce help files (HTML 1.0)

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.