public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: <rmann@rmisp.net>
To: <speakup@braille.uwo.ca>
Subject: Re: Telephone / Address directory program?
Date: Wed, 16 Jan 2002 19:52:29 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.33.0201161951170.6649-200000@rmnet> (raw)
In-Reply-To: <20020116232642.GB25304@asmodean.net>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1637 bytes --]

Hi.
I've attached a simple program to store People's addresses.  To compile
it, do "gcc -o address address.cpp".


On Wed, 16 Jan 2002, Raul A. Gallegos wrote:

> Georgina said the following on Wed, Jan 16, 2002 at 11:23:02PM +0000:
> > Hi
>
> Howdy.
>
> > I wondered if there were any handy terminal programs for storing telephone numbers and addresses.  While I've been playing with postgresql, I don't know variations of the select statements well enough for this simple task.  It feels like using a sledge hammer for a very small nut.  I'm just looking for a small program that I as a single user can enter names, addresses and telephone numbers and retrieve quite easily.  Any ideas?
>
>
> I don't remember which distro you use but there is a Debian package
> which I use and works quite well.  If you don't use Debian I'm sure you
> can find it from freshmeat.net and install it manually.
>
> Package: abook
> Priority: optional
> Section: mail
> Installed-Size: 176
> Maintainer: Alan Ford <alan@whirlnet.co.uk>
> Architecture: i386
> Version: 0.4.14-1
> Depends: libc6 (>= 2.2.3-7), libncurses5 (>= 5.2.20010310-1)
> Filename: pool/main/a/abook/abook_0.4.14-1_i386.deb
> Size: 34556
> MD5sum: 39683e77a3ad53bcd551865b82c5e7c5
> Description: A text-based ncurses address book application.
>  abook is a text-based ncurses address book application. It provides
> many
>  different fields of user info. abook is designed for use with mutt, but
>  can be used independently.
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1167 bytes --]

#include <iostream.h>
#include <fstream.h>//header file for file IO
int main()
{
char name[30];
char address[30];
char city[30];
char state[3];
char zip[6];
char phone[13];
int cont = 1;
ofstream outfile;
outfile.open("address.txt", ios::app);
if(outfile)
{
while(cont != 0)
{
cout << "Enter the person's name.\n";
cin.get(name, 30);
cin.ignore(80, '\n');
cout << "Enter the person's address.\n";
cin.get(address, 30);
cin.ignore(80, '\n');
cout << "Enter the city.\n";
cin.get(city, 30);
cin.ignore(80, '\n');
cout << "Enter the two letter state abreviation.\n";
cin.get(state, 3);
cin.ignore(80, '\n');
cout << "Enter the postal code.\n";
cin.get(zip, 6);
cin.ignore(80, '\n');

cout << "Enter the phone number.\n";
cin.get(phone, 13);
cin.ignore(80, '\n');
outfile << name << "\n";
outfile << address << "\n";
outfile << city << "\n";
outfile << state << ",";
outfile << zip << "\n";
outfile << phone << "\n";
cout << "To quit this program type 0 then return.\n";
cout << "Type return to continue.\n";
cin >> cont;
}
}
else
{
	cout << "Their was an error opening the file.\n";
}
outfile.close();
return 0;
}


  reply	other threads:[~ UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Georgina
 ` Raul A. Gallegos
   ` rmann [this message]
 ` Steve Holmes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0201161951170.6649-200000@rmnet \
    --to=rmann@rmisp.net \
    --cc=speakup@braille.uwo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).