// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // fstream_test.c -- // // Author : Richard C. Bilson // Created On : Wed May 27 17:56:53 2015 // Last Modified By : Peter A. Buhr // Last Modified On : Mon Jan 4 11:30:39 2016 // Update Count : 41 // #include "fstream.h" int main( void ) { ofstream *sout = ofstream_stdout(); ifstream *sin = ifstream_stdin(); int nombre; sout | "Entrez un nombre, s'il vous plaît:\n"; sin | &nombre; sout | "Vous avez entré " | nombre | " stocké à l'adresse " | &nombre | endl; sout | "nombre " | nombre | " est " | (nombre > 0 ? "plus grand que" : nombre == 0 ? "égal à" : "moins de") | " zéro" | endl; sout | "Entrez trois nombres, s'il vous plaît:\n"; int i, j, k; sin | &i | &j | &k; sout | "Vous avez entré " | "i:" | i | " j:" | j | " k:" | k | endl; sout | 3 | ' ' | 3.5 | ' ' | 'a' | ' ' | "abc" | endl; } // Local Variables: // // tab-width: 4 // // compile-command: "cfa fstream_test.c" // // End: //