oh yeah. well it happens sometimes
Hi,
Can anyone give me a hint of what I'm doing wrong here?
not pretty, but here's my code...
#include <iostream.h>
#include "apstring.h"
#include <fstream.h>
int main()
{
apstring user_name;
int street_num;
apstring street_name;
apstring apt_num;
apstring city;
apstring state;
int zip;
ofstream outfile;
ifstream infile;
outfile.open("ADDR.DAT", ios::out);
cout <<"Enter your name: ";
getline(cin, user_name);
cout << "Enter your street number: ";
cin >> street_num;
cout << "Enter your street name: ";
getline(cin, street_name);
cout << "Enter your apartment or hit enter if none: ";
cin >> apt_num;
cout << "Enter your City: ";
getline(cin, city);
cout << "Enter your 2 digit state code: ";
getline(cin, state);
cout << "Enter your zip code: ";
cin >> zip;
outfile << "Name: " << user_name << endl;
outfile << "Address: " << street_num, street_name << endl;
outfile << apt_num << endl;
outfile << city, state, zip << endl;
outfile.close();
return 0;