Hello, I am trying to send serial port a double value as 8 sets of uint8 by means of union and receiving in the same manner. For that, im calling read and write functions from an external '.cpp'file through class-object implementation as you see in my code.I use that implementation seperately in transmit and receive functions. int transmit (double x) { union ifas { double d; unsigned char u8value[8]; //uint8 }; union ifas member; CSyncSerialComm *ObjectCSyncSerialComm; //Object in class from ext.file ObjectCSyncSerialComm = new CSyncSerialComm("0x3F8"); member.d = x; printf("\nmember.d=%f\n",member.d); ObjectCSyncSerialComm.WriteFile(m_hSerialComm, member.u8value, 8, &dwNumberOfBytesWritten, NULL); delete ObjectCSyncSerialComm ; return (int) member.u8value; } double receive(unsigned char) { union aachen { double c; unsigned char u8value[8]; }; union aachen team; CSyncSerialComm *ObjectCSyncSerialComm; ObjectCSyncSerialComm = new CSyncSerialComm("0x3F8"); ObjectCSyncSerialComm.ReadFile(m_hSerialComm, &szBuf, 10, &dwIncommingReadSize, NULL); delete ObjectCSyncSerialComm ; return (double)team.c ; } int main(int argc, char* argv[]) { double var; unsigned char z; scanf("%lf",&var); transmit(var); receive(z); return 0; } What i want to ask you is, in writing and reading commands i'm receiving syntax errors. If I type both in reading and writing (bold lines), ObjectCSyncSerialComm.ReadFile(m_hSerialComm, &szBuf, 10, &dwIncommingReadSize, NULL); Error==> On the left side of the structure . or .* is required If I type as follows, ObjectCSyncSerialComm.*ReadFile(m_hSerialComm, &szBuf, 10, &dwIncommingReadSize, NULL); Error==> Invalid pointer used. By the way, im using C++ Builder 6.0 Compiler. What could be the problem? Any other problem can cause this? I could not find any solution. Any comment and/or suggestion will be appreciated.Thank you. Regards, Cahit -- modified at 12:01 Friday 18th August, 2006