Note that there are some explanatory texts on larger screens.

plurals
  1. POVCL form application
    primarykey
    data
    text
    <p>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.</p> <p>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?</p> <p><strong>UPDATE</strong></p> <p>Here is my code:</p> <pre><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 &lt;&lt; "Appintment Date: " &lt;&lt; appDateTime &lt;&lt; endl; cout &lt;&lt; "Appintment Reminder Date: " &lt;&lt; appReminderDateTime &lt;&lt; endl; cout &lt;&lt; "Appintment Type: " &lt;&lt; appType &lt;&lt; endl; cout &lt;&lt; "Appintment Location: " &lt;&lt; appLocation &lt;&lt; endl; cout &lt;&lt; "Appintment Comments: " &lt;&lt; appComments &lt;&lt; endl; if (appIsImportant) { cout &lt;&lt; "Appintment IsImportant: " &lt;&lt; "Yes" &lt;&lt; endl; } else { cout &lt;&lt; "Appintment IsImportant: " &lt;&lt; "No" &lt;&lt; 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; }; </code></pre> <p>I know that with strings, the following is used in .cpp files:</p> <pre><code>const std::string&amp; exampleString </code></pre> <p>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? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload