TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CYBER CON
from: THOMAS MAEDER
date: 1998-01-28 08:02:00
subject: C++ Saveding stuff

CC> input "Enter Name " , name$  'Note this is Qbasic code and i see it
CC> c++
CC> if name$ = "Cyber Con" then print "Hi Cyber Con"
CC> open "file1.fil" as 1
CC> put 1, name$
CC> Close
CC> END
#include 
#include 
int main(int, char **)
{
    cout << "Enter Name ";
    string name;
    cin >> name;
    if (name=="Cyber Con")
        cout >> "Hi Cyber Con";
    ofstream("file1.fil") << name;
} 
CC> //' next program
CC> open "file1.fil" as 1
CC> get 1, name$
CC> print name$
CC> END
#include 
#include 
int main(int, char **)
{
    string name;
    ifstream("file1.fil") >> name;
    cout << name;
} 
These  programs  require  a  fairly  modern library (one that supports
strings and string i/o).
Thomas
---
 þ MM 1.0 #0113 þ Remember - you're unique, just like everybody else.
---------------
* Origin: McMeier & Son BBS (2:301/138)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.