1

Topic: Functions in a C ++ Builder......

Prompt how to transfer in function being in the principal form from other form.
[spoiler]

//----------------- [b] the main window of the program [/b]----------------------------------------------------------
__ fastcall TForm_MainForm:: TForm_MainForm (TComponent* Owner)
: TForm (Owner)
{
}
//------------------ [b] function [/b]---------------------------------------------------------
func_StringHeshMD5 (const String Text)
{
String resMD5;
.....................
.....................
}
//---------------------------------------------------------------------------------------------
//----------------------- [b] the Second form [/b]----------------------------------------------------
void __ fastcall TForm_Avtorizacia:: BB_enterClick (TObject *Sender)
{
func_StringHeshMD5 (E_UserPassw-> Text);
}
//---------------------------------------------------------------------------

[/spoiler]
The error text:
[spoiler]

[bcc32 Error] Unit_FAutorizacia.cpp (69): E2268 Call to undefined function ' func_StringHeshMD5'
Full parser context
Unit_FAutorizacia.cpp (50): parsing: void _fastcall TForm_Avtorizacia:: BB_enterClick (TObject *)

[/spoiler]
Yours faithfully Anatoly With.

2

Re: Functions in a C ++ Builder......

Anatoliy S.,
a class from the main form should be included in file Unit_FAutorizacia.cpp
But it is better to carry out function in the separate unit and to include in Unit_FAutorizacia.cpp and in MainForm.cpp