小编dan*_*sdc的帖子

如何在C中将字符串常量转换为预处理标记

我想使用宏将字符串常量转换为预处理令牌.例:


    // get the first character of marco argument to postfix of new data type.
    #define TYPE(typename) Prefix ## typename #typename[0]
    void main()
    {
        TYPE(int) a, b, c; // Prefixinti a, b, c;
        TYPE(float) x, y, z; // Prefixfloatf x, y, z;
        a = 3;
    }

在C/C++中有可能吗?
p/s:抱歉我的英语不好.
编辑

c c++ macros

6
推荐指数
1
解决办法
3069
查看次数

为什么将图像转换为频域

在一些图像处理过滤器中,我看到图像从空间域转换到频域.我的问题是:为什么我们这样做?空间域中的图像与频域中的图像有何不同?

image-processing

6
推荐指数
1
解决办法
1662
查看次数

标签 统计

c ×1

c++ ×1

image-processing ×1

macros ×1