why does this crash? Or how would I make it work?
Code:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i,d,z;
char c[5];
for(i=0;i<=7;i++) {
z++;
c[i]= Edit1->Text[z]; // c... Data being generated
}
for(d=0;d<=6;d++) {
Edit2->Text = Edit2->Text+ c[d]+"";
// WriteFile( HdComm, &c[d], 1, &RealNum, NULL ); //c...is the data
}
}
I would llike to send individual bytes through COM1 to a µProcessor , being able to either get the ASCII value orcthe character .
Any help would be appreciatted.