Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace od
- {
- scope io
- {
- scope keyboard
- {
- scope constants
- {
- const int vk_space, vk_enter;
- }
- bool keyCheck();
- bool keyPressed();
- bool keyReleased();
- }
- scope mouse
- {
- scope constants
- {
- const int mb_left;
- }
- bool mousePressed();
- }
- }
- string libraryVersion();
- }
- using od.io.keyboard;
- unuse od.io.keyboard.constants;
- {
- using od;
- // possibilité d'utiliser n'importe quelle fonction d'od:
- libraryVersion();
- keyPressed(vk_space);
- }
- {
- using od.io;
- // possibilité d'utiliser toutes les fonctions du scope io contenu dans od
- libraryVersion(); // erreur
- keyPressed(vk_space); // ok
- }
- {
- using od::keyPressed;
- // possibilité d'utiliser uniquement keyPressed
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement