Ive seen a lot of people use this structure in their code:
ifdef LOCAL
(Part of code that works locally)
else
(The previous part doesn't work in online mode)
endif
instead of LOCAL some other strings can be written too. What I want to know is how to make this structure work. how to make ifdef LOCAL work?
btw Im using devc++.
thanks in advance for helping.
Add -DLOCAL to compiler command line
Yes but the problem is that where is compiler command line? this was my actual problem...
Look it up for your IDE. Something like "dev c++ edit compiler flags".
how?
can you please read what's already written above
I asked to a friend so you gotta add it after you write g++. He doesn't explains it well. And you're toxic.
Try this: g++ -DLOCAL filename.cpp -o %:r && ./%:r