<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -56,6 +56,7 @@ void getCusInfo();
 void getSerInfo();
 void searchSerCompleted();
 void searchCurrentCus();
+void writeData();
 
 int main()
 {
@@ -143,8 +144,9 @@ void getCusInfo()
 
 		cout &lt;&lt; &quot;Is this correct?  (1=yes, 2=no)&quot;;
 		cin &gt;&gt; confirm;
-		if (confirm != 1) {
+		if (confirm == 1) {
 			customers.push_back(new_customer);
+			writeData();
 		}
 		cout &lt;&lt; endl &lt;&lt; endl;
 	}
@@ -325,3 +327,20 @@ void searchCurrentCus()
 //close the customer files
 	cusInFile.close();
 }
+void writeData()
+{
+	ofstream csv;
+	csv.open(&quot;cust.csv&quot;);
+
+	for (unsigned int i = 0; i &lt; customers.size(); i++) {
+		csv
+			&lt;&lt; customers.at(i).record &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).fname &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).lname &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).home &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).work &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).cell &lt;&lt; &quot;,&quot;
+			&lt;&lt; customers.at(i).license_plate &lt;&lt; endl;
+	}
+	csv.close();
+}</diff>
      <filename>oc.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>33d66c7ada89290651059d360fd98eaf86b12de3</id>
    </parent>
  </parents>
  <author>
    <name>Caleb Cushing</name>
    <email>xenoterracide@gmail.com</email>
  </author>
  <url>http://github.com/xenoterracide/school/commit/729022f7df301a4552390d2d74292123ba7ead0b</url>
  <id>729022f7df301a4552390d2d74292123ba7ead0b</id>
  <committed-date>2009-06-10T05:07:17-07:00</committed-date>
  <authored-date>2009-06-10T05:03:38-07:00</authored-date>
  <message>add writeData() function</message>
  <tree>aba572f5f28544a4a9573b57d8636cea47d71e74</tree>
  <committer>
    <name>Caleb Cushing</name>
    <email>xenoterracide@gmail.com</email>
  </committer>
</commit>
