Pre-processor "define" 2 programs.

in #programming8 years ago

Program Body

#include < iostream >
#define ABS(str,wolf)((str) =="sabi" | (wolf)=="alpha" ? "You are right" :("wolfi no wolfie"))
using namespace std;

int main(){
cout<<ABS("wolf","alpha");
}

Second Program Body

#include
#define VAMP
using namespace std;

int main (){
#ifdef VAMP
cout<<"defined wolf"<<endl;
#else
cout<<"not defined"<<endl;
#endif
#undef VAMP
#ifndef VAMP
cout<<"woao it is defined"<<endl;
#else
cout<<"AHH??? not defined dud"<<endl;
#endif // VAMP
}

made in

written in C++ language

Complied in Codeblocks

i hope you guys liked it

Sort:  

Thanks for sharing coding in c++ .i learne it.

thank you guys

Your intrest in programming and studying bio... I cant understand... Your grip in programming dual role well