Ignore:
Timestamp:
Nov 3, 2014, 4:38:08 PM (10 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
8c17ab0
Parents:
93885663
Message:

add compiler flag to driver, update examples, fix unnamed bit fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/examples/hello.c

    r93885663 r134b86a  
    33// "cfa hello.i fstream.i iostream.o"
    44
    5 extern "C" {
    6 int printf( const char*, ... );
    7 }
    8 
    95#include "fstream.h"
    106
    117int main() {
    12   ofstream *sout = ofstream_stdout();
    13   write( sout, "test\n", 5 );
    14   sout << "Bonjour au monde!\n";
    15   return 0;
     8    ofstream *sout = ofstream_stdout();
     9    ifstream *sin = ifstream_stdin();
     10    sout << "Bonjour au monde!\n";
     11    sout << 3 << " " << 3.5 << " " << 'a' << " " << "abc" << "\n";
     12    int i, j, k;
     13    sin >> &i >> &j >> &k;
     14    sout << "i:" << i << " j:" << j << " k:" << k << "\n";
    1615}
Note: See TracChangeset for help on using the changeset viewer.