使用include指令初始化聚合
发布时间:2020-12-14 04:53:59 所属栏目:百科 来源:网络整理
导读:很快的问题.我要复制使用include指令将文本数据粘贴到单独文件的源代码中. 这合法吗? struct Record; // collection of data fieldsRecord rec = { #include "some_big_record.txt" };int numbers[] = { #include "some_long_sequence_of_numbers.txt" };
很快的问题.我要复制&使用include指令将文本数据粘贴到单独文件的源代码中.
这合法吗? struct Record; // collection of data fields Record rec = { #include "some_big_record.txt" }; int numbers[] = { #include "some_long_sequence_of_numbers.txt" }; 它适用于我的盒子(GCC),但它是否可移植? 解决方法
这是便携的:
Record rec = { #include "some_big_record.txt" }; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |