<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:brucereid</id>
  <title>brucereid</title>
  <subtitle>brucereid</subtitle>
  <author>
    <name>brucereid</name>
  </author>
  <link rel="alternate" type="text/html" href="http://brucereid.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://brucereid.livejournal.com/data/atom"/>
  <updated>2004-10-16T17:52:30Z</updated>
  <lj:journal userid="4740323" username="brucereid" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://brucereid.livejournal.com/data/atom" title="brucereid"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:brucereid:267</id>
    <link rel="alternate" type="text/html" href="http://brucereid.livejournal.com/267.html"/>
    <link rel="self" type="text/xml" href="http://brucereid.livejournal.com/data/atom/?itemid=267"/>
    <title>C Assignment</title>
    <published>2004-10-16T17:52:30Z</published>
    <updated>2004-10-16T17:52:30Z</updated>
    <content type="html">I am suppose to make a programme that counts the number of vowels in an input file. Can somebody please tell me what I am doing wrong on this assignment?  PLEASE!?&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is what I am trying to print:&lt;br /&gt;&lt;br /&gt;Sample output:&lt;br /&gt;   &lt;br /&gt;   a: 48: ************************************************&lt;br /&gt;   e: 49: *************************************************&lt;br /&gt;   i: 48: ************************************************&lt;br /&gt;   o: 42: ******************************************&lt;br /&gt;   u: 17: *****************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is my code:&lt;br /&gt;&lt;br /&gt;#include &lt;div class='ljparseerror'&gt;[&lt;b&gt;Error:&lt;/b&gt; Irreparable invalid markup ('&amp;lt;stdio.h&amp;gt;') in entry.  Owner must fix manually.  Raw contents below.]&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 95%; overflow: auto"&gt;I am suppose to make a programme that counts the number of vowels in an input file. Can somebody please tell me what I am doing wrong on this assignment?  PLEASE!?&lt;br /&gt;&lt;br /&gt;&amp;lt;lj-cut text=&amp;quot;PRoblem&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;Here is what I am trying to print:&lt;br /&gt;&lt;br /&gt;Sample output:&lt;br /&gt;   &lt;br /&gt;   a: 48: ************************************************&lt;br /&gt;   e: 49: *************************************************&lt;br /&gt;   i: 48: ************************************************&lt;br /&gt;   o: 42: ******************************************&lt;br /&gt;   u: 17: *****************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is my code:&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;   FILE* infile = fopen(&amp;quot;vowels.in&amp;quot;, &amp;quot;r&amp;quot;);&lt;br /&gt;   FILE* outfile = fopen(&amp;quot;vowels.out&amp;quot;, &amp;quot;w&amp;quot;);&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;   int a,e,i,o,u,j;&lt;br /&gt;   a=0;&lt;br /&gt;   e=0;&lt;br /&gt;   i=0;&lt;br /&gt;   o=0;&lt;br /&gt;   u=0;&lt;br /&gt;   char current; &lt;br /&gt;    &lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;   fscanf(infile, &amp;quot;%c&amp;quot;, &amp;amp;current); &lt;br /&gt;   if(current == &amp;quot;a&amp;quot;);&lt;br /&gt;   a++ ;&lt;br /&gt;   if(current == &amp;quot;e&amp;quot;)&lt;br /&gt;   e++ ; &lt;br /&gt;   if(current == &amp;quot;i&amp;quot;)&lt;br /&gt;   i++ ;             &lt;br /&gt;   if(current == &amp;quot;o&amp;quot;)&lt;br /&gt;   o++ ;         &lt;br /&gt;   if(current == &amp;quot;u&amp;quot;)&lt;br /&gt;   u++ ;  &lt;br /&gt;   if(feof(infile)) break; &lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   fprintf(outfile, &amp;quot;a: %d: &amp;quot;, a);&lt;br /&gt;   for(j=0; j&amp;lt;=a; j++)&lt;br /&gt;   {&lt;br /&gt;   fprintf(outfile, &amp;quot;*&amp;quot;);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   fprintf(outfile, &amp;quot;\ne: %d: &amp;quot;, e);&lt;br /&gt;   for(j=0; j&amp;lt;=e; j++)&lt;br /&gt;   {&lt;br /&gt;   fprintf(outfile, &amp;quot;*&amp;quot;);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   fprintf(outfile, &amp;quot;\ni: %d: &amp;quot;, i);&lt;br /&gt;   for(j=0; j&amp;lt;=i; j++)&lt;br /&gt;   {&lt;br /&gt;   fprintf(outfile, &amp;quot;*&amp;quot;);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   fprintf(outfile, &amp;quot;\no: %d: &amp;quot;, o);&lt;br /&gt;   for(j=0; j&amp;lt;=o; j++)&lt;br /&gt;   {&lt;br /&gt;   fprintf(outfile, &amp;quot;*&amp;quot;);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   fprintf(outfile, &amp;quot;\nu: %d: &amp;quot;, u);&lt;br /&gt;   for(j=0; j&amp;lt;=u; j++)&lt;br /&gt;   {&lt;br /&gt;   fprintf(outfile, &amp;quot;*&amp;quot;);&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;      &lt;br /&gt;   return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here are my errors:&lt;br /&gt;&lt;br /&gt;Compiling...&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(15) : error C2143: syntax error : missing &amp;#39;;&amp;#39; before &amp;#39;type&amp;#39;&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(19) : error C2065: &amp;#39;current&amp;#39; : undeclared identifier&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(20) : warning C4047: &amp;#39;==&amp;#39; : different levels of indirection&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(22) : warning C4047: &amp;#39;==&amp;#39; : different levels of indirection&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(24) : warning C4047: &amp;#39;==&amp;#39; : different levels of indirection&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(26) : warning C4047: &amp;#39;==&amp;#39; : different levels of indirection&lt;br /&gt;c:\docume~1\bruce\mydocu~1\programs\vowels.c(28) : warning C4047: &amp;#39;==&amp;#39; : different levels of indirection&lt;br /&gt; CL returned error code 2.&lt;br /&gt;VOWELS.C - 2 error(s), 5 warning(s)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/lj-cut&amp;gt;&lt;/div&gt;&lt;/div&gt;</content>
  </entry>
</feed>
