I have a C++ file that uses functions defined in another C++ file. Let's say I am working with main.cpp and func.cpp.
func.cpp
#define SIZE 32
bitset<SIZE> functionA(int a)
{
Code;
}
and I have main.cpp
main.cpp
#include "func.cpp"
int main(void)
{
int a;
cin >> a;
bitset<64> out;
out = functionA(a); /// This is the functionality I want.
}
I don't want to directly change the value of SIZE in func.cpp. I want a way to somehow change the macros definition of SIZE to 64 from main.cpp. After this, I can call functionA and expect it to return a bitset of size 64.