home *** CD-ROM | disk | FTP | other *** search
- /* Listing 5. Main program for C++ tab expansion */
-
- #include "tabexp.hpp"
-
- main()
- {
- int c;
- /* declare a tab expander using stdin and 8-spaces */
- tabexp te(stdin, 8);
-
- do { /* loop until no more characters in input */
- c = te.get();
- if (c == -1) break; else putc(c, stdout);
- } while(1);
- }