Hi,
I'm embedded c coder and relatively new to c++. I'm working with borland 6.
What i'm trying to do is call my "SerialThread" named worker thread which processes the line.
Call
//char input_sentence[9]; this includes the textline "ANGLE 360"
char * buff = input_sentence;
thread = _beginthread( SerialThread, 8192, (void *)&buff);
This thread version gives access violation
void SerialThread( void *input)
{
char * line = *(char**)input;
Fmain->Memo1->Lines->Append(line);
_endthread();
}
This version outputs character "T".
void SerialThread( void *input)
{
char line = *(char*)input;
Fmain->Memo1->Lines->Append(line);
_endthread();
}
Tried with string but got std::bad_alloc
If i just pass the input_sentence, i will get only first charachter to output.
Any help wil be appriciated.