... #include <iostream> int main(int argc, char **argv) { std::cout << "Bonjour tout le monde." << std::endl; return 0; } ...
... rdvcpp.exe ...
... #include <iostream> int main(int argc, char **argv) { std::cout << "argc : " << argc << std::endl; for (int i = 0; i < argc; i++) { std::cout << "argv[" << i << "] : " << argv[i] << std::endl; } return 0; } ...
... rdvcpp.exe un deux trois quatre ...
... #include <iostream> #define NUMBER 4 int main(int argc, char **argv) { std::cout << "NUMBER : " << NUMBER << std::endl; return 0; } ...
... rdvcpp.exe ...
... #include <iostream> #define MESSAGE(ARGC, ARGV) \ do \ { \ std::cout << "argc : " << ARGC << std::endl; \ for (int i = 0; i < ARGC; i++) \ { \ std::cout << "argv[" << i << "] : " << ARGV[i] << std::endl; \ } \ } while (false) int main(int argc, char **argv) { MESSAGE(argc, argv); return 0; } ...
... rdvcpp.exe un deux trois quatre ...
... #include <iostream> #ifdef DEBUG_ON #define MESSAGE(ARGC, ARGV) \ do \ { \ std::cout << "argc : " << ARGC << std::endl; \ for (int i = 0; i < ARGC; i++) \ { \ std::cout << "argv[" << i << "] : " << ARGV[i] << std::endl; \ } \ } while (false) #else #define MESSAGE #endif int main(int argc, char **argv) { MESSAGE(argc, argv); return 0; } ...
... [outil-developpement] > Configurer > DEBUG_ON ...
... rdvcpp.exe un deux trois quatre ...
... #include <iostream> #include "rdv_defines.h" int main(int argc, char **argv) { std::cout << "NUMBER : " << NUMBER << std::endl; return 0; } ...
... #pragma once #define NUMBER 4 ...
... rdvcpp.exe ...
... #include "rdv_pch.h" int main(int argc, char **argv) { std::cout << "Bonjour tout le monde." << std::endl; return 0; } ...
... #pragma once #include <iostream> #include <string> #include <ctime> ...
... [outil-developpement] > Configurer > rdv_pch.h ...
... rdvcpp.exe ...
... #include <iostream> static void Hello_Run(); int main(int argc, char **argv) { Hello_Run(); return 0; } static void Hello_Run() { std::cout << "Bonjour tout le monde." << std::endl; } ...
... rdvcpp.exe ...
... #include "rdv_hello.h" int main(int argc, char **argv) { Hello_Run(); return 0; } ...
... #pragma once void Hello_Run(); ...
... #include "rdv_hello.h" #include <iostream> void Hello_Run() { std::cout << "Bonjour tout le monde." << std::endl; } ...
... rdvcpp.exe ...
... #include "cHello.h" int main(int argc, char **argv) { cHello oHello; oHello.run(); return 0; } ...
... #pragma once class cHello { public: cHello(); ~cHello(); void run(); }; ...
... #include "cHello.h" #include <iostream> cHello::cHello() { } cHello::~cHello() { } void cHello::run() { std::cout << "Bonjour tout le monde." << std::endl; } ...
... rdvcpp.exe ...
... #include "cClass.h" int main(int argc, char **argv) { cClass oClass; oClass.run(); return 0; } ...
... #pragma once class cClass { public: cClass(); ~cClass(); void run(); }; ...
... #include "cClass.h" #include <iostream> cClass::cClass() { std::cout << "Constructeur : cClass::cClass()" << std::endl; } cClass::~cClass() { std::cout << "Destructeur : cClass::~cClass()" << std::endl; } void cClass::run() { std::cout << "Methode : cClass::run()" << std::endl; } ...
... rdvcpp.exe ...