Hi,
hmmmm ... so my english is so bad, but I try to explane my problem.
-------------------------------
I have write a console application in C++ and I want to import the functions in a Windows App. (I use Win32 API).
The following function works absolute correct in the console but don't works under Win32 API:
void LISTING::list ( char *f_name, char *l_name, char *strt, char *city )
{
if ( first == NULL )
{
first = new usersmatch;
last = first;
}
else
{
last->next = new usersmatch; //here comes the Access Violation from Windows
last = last->next;
}
strcpy ( last->firstname, f_name );
strcpy ( last->lastname, l_name );
strcpy ( last->street, strt );
strcpy ( last->city, city );
last->next = NULL;
}
With the following code I read the user-inputs from a Dialog-Window:
GetDlgItemText ( hwnd, IDC_MAIN_NAME, firstname, sizeof ( firstname ));
func.list ( firstname, ... );
And then, come a big ERROR, but I don't know, what I make wrong ...
Have anybody some ideas ?
ThX for helping
SiM
[sig][/sig]
hmmmm ... so my english is so bad, but I try to explane my problem.
-------------------------------
I have write a console application in C++ and I want to import the functions in a Windows App. (I use Win32 API).
The following function works absolute correct in the console but don't works under Win32 API:
void LISTING::list ( char *f_name, char *l_name, char *strt, char *city )
{
if ( first == NULL )
{
first = new usersmatch;
last = first;
}
else
{
last->next = new usersmatch; //here comes the Access Violation from Windows
last = last->next;
}
strcpy ( last->firstname, f_name );
strcpy ( last->lastname, l_name );
strcpy ( last->street, strt );
strcpy ( last->city, city );
last->next = NULL;
}
With the following code I read the user-inputs from a Dialog-Window:
GetDlgItemText ( hwnd, IDC_MAIN_NAME, firstname, sizeof ( firstname ));
func.list ( firstname, ... );
And then, come a big ERROR, but I don't know, what I make wrong ...
Have anybody some ideas ?
ThX for helping
SiM
[sig][/sig]