Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!pasteur!galileo.berkeley.edu!jbuck From: jbuck@galileo.berkeley.edu (Joe Buck) Newsgroups: comp.lang.c++ Subject: Re: C file functions in C++ Message-ID: <10167@pasteur.Berkeley.EDU> Date: 13 Jan 91 02:48:42 GMT References: <15556@sdcc6.ucsd.edu> Sender: news@pasteur.Berkeley.EDU Reply-To: jbuck@galileo.berkeley.edu.UUCP (Joe Buck) Organization: U.C. Berkeley -- ERL Lines: 28 In article <15556@sdcc6.ucsd.edu> cs161fch@sdcc10.ucsd.edu (Strange Attractor) writes: >I've just learned basic C++ in a class at school. I'm now going >through a C++ book to learn the other features. I have 2 questions. > >[1] Does have a scanf() like it has a printf as > cout< is very vendor-dependent. There is no standard. >[2] C has fopen (filename,"r+") and other "+" options that allow both > reading and writing. Can you do this in ? You can call any C function from C++, including fopen and scanf. Just say #include in some environments you may have to say extern "C" { #include } -- -- Joe Buck jbuck@galileo.berkeley.edu {uunet,ucbvax}!galileo.berkeley.edu!jbuck