CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011

    Post Person/Name Database

    I have tried to create a program where the user inputs a name and then it calls upon a function to report data about that person's name. I just wasn't sure how to properly call upon just 1 person's name instead of all of them. I only have 2 examples so far. These names are fake and maid up by the way. This program is just for fun and for learning. Sorry if I posted in the wrong forum or anything like that, this is my first post

    So far my code is:

    #include <cstdlib>
    #include <iostream>
    #include <cmath>
    #include <string>

    void Liz_Jacobin(int);

    void Jake_Jones(int);

    using namespace std;

    int main()
    string name;
    int a;
    int call;
    int password;
    system("color 0A");

    cin >> name;
    cout << "The person you have requested info about is ";
    cout << "[";
    cout << name;
    cout << "]";
    cout << endl;
    cout << "Enter you administer password ";
    cin >> password;
    cout << endl;
    cout << endl;
    cout << "Your data includes";
    cout << endl;
    name = a;
    if (a == Liz_Jacobin)

    if (a == Jake_Jones)

    cout << endl;

    return 0;

    void Liz_Jacobin(int x)
    string data;
    using namespace std;
    data = "Liz is a girl ";
    cout << data;
    cout << endl;

    void Jake_Jones(int x)
    string data;
    using namespace std;
    data = "Jake plays soccer ";
    cout << data;
    cout << endl;
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2009

    Re: Person/Name Database

    If you would post this in the C++ (non visual) forum you will be in the right forum. And they will assinate you with this code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.