Sunday, January 23, 2011

Constant string shared accross classes.

In C++ using g++
------------------------
#ifdef THREAD_CLASS_CPP
const GSN_S8 *SPI_BUS_SYNCH="tA"; //0x7441;
#else
extern const GSN_S8 *SPI_BUS_SYNCH;
#endif


In C using gcc
---------------------
#ifndef DWIFI_C
extern const char ATI_REPLY_OK[];
#else
const char ATI_REPLY_OK[]="I/OK";
#endif

No comments: