[C언어]매크로의 샵(#)숄레이션~
매크로에서 샵(#)을 활용하는 법을 알아보자. int main() { int a = 100, b = 20, c; float fa = 50.2, fb = 20.4, fc = 0.0; c=fun(add, int, a, b); out(add, int, c); c=fun(div, int, a, b); out(div, int, c); c=fun(mul, int, a, b); out(mul, int, c); fc=fun(add, float, a, b); out(add, float, fc); fc=fun(div, float, a, b); out(div, float, fc); fc=fun(mul, float, a, b); out(mul, float, fc); return 1; } 여기서 fun과 out을 구현하는 방법..
2008. 6. 3.