Advertisement
obernardovieira

Editores de texto (Windows e Linux)

Jul 29th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
  5. #define EDITOR "notepad"
  6. #else
  7. #define EDITOR "emacs"
  8. #endif
  9.  
  10. int main() {
  11.     printf( "Now I'm going to start your text editor!\n" );
  12.     system( EDITOR );
  13.     printf( "Good-bye!\n" );
  14.     return 0;
  15.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement