Profile Creator
It asks you name, age, height, etc. and puts them in a *.txt file...
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
#include <iostream.h>
#include <fstream.h>
/////////////////////////
//Made By Pat Underwood//
//http://patu.iwarp.com//
/////////////////////////
int age, heightin, heightft;
char firstname[30];
char lastname[30];
char gender[7];
ofstream foo("profiles.txt");
void main () {
//Start questioning
cout << "Enter your first name:\n";
cin >> firstname;
cout << "Enter your last name:\n";
cin >> lastname;
cout << "Enter your gender (male or female):\n";
cin >> gender;
cout << "Enter your age:\n";
cin >> age;
cout << "Enter your height (feet only) :\n";
cin >> heightft;
cout << "Enter your height (inches only) :\n";
cin >> heightin;
//Start confimation
cout << "-" << firstname << lastname << "\n";
cout << "-" << gender << "\n";
cout << "- Age = " << age << "\n";
cout << "-" << heightft << "' " << heightin << "''\n";
foo << "Name: " << firstname << " " << lastname << "\n";
foo << "Gender/Sex: " << gender << "\n";
foo << "Age: " << age << "\n";
foo << "Height: " << heightft << "' " << heightin << "''\n";
cout << "Thank you, your new profile is being created...\n";
cout << "This program was made by Pat Underwood, you can get more of his software at \nhttp://patu.iwarp.com\n";
}
<?
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
// Microsoft Access connection string.
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\\inetpub\\wwwroot\\php\\mydb.mdb");
// SQL statement to build recordset.
$rs = $conn->Execute("SELECT myfield FROM mytable");
echo "<p>Below is a list of values in the MYDB.MDB database, MYABLE table, MYFIELD field.</p>";
// Display all the values in the recordset
while (!$rs->EOF) {
$fv = $rs->Fields("myfield");
echo "Value: ".$fv->value."<br>\n";
$rs->MoveNext();
}
$rs->Close();
?>
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine