I want to compare My enum’s vlaue(A,B,C) with my CSV file.
(CSV file is not descript this write. But the contents is like this.)
A
B
C
D
What i want to get from this code is the COMPARE RESULT.
(Something exist in SOURCE[enum] or Not exist in SOURCE[enum] compare with CSV file)
I use boost library and i used preprocessor to get my goal.
#include <iostream>
#include <string>
#include <boost/preprocessor.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
enum name
{
A=1,
B=2,
C=5
}
#define MACRO(r,data,elem) foo(#elem);
void foo(std::string a)
{
std::cout << a << 'n';
}
int main()
{
BOOST_PP_SEQ_FOR_EACH(MACRO, name);
}
New contributor
user25302790 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.