How can I Use macro to define different datatypes depend on parameter?

  • Thread starter Thread starter 过往成炎
  • Start date Start date

过往成炎

Guest
define MYPTR(n) if((n)==16?(USHORT*):(BYTE*))


What I want to do is, if n==16 then "MYPTR(n) pData;" should equal to "USHORT* pData". Otherwise it should be "BYTE* pData"

but it did not work.I really don't know how to do it.Help plz.

Continue reading...
 

Similar threads

Back
Top