<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'"c" compiler error message...' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread '"c" compiler error message...' posted on the 'C and C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 00:09:15 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 00:09:15 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>"c" compiler error message...</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/429000/429000/c-compiler-error-message/</link>
      <description>why is the compiler giving me an error of undefined reference to&lt;br /&gt;
'findChar' ? also how can I display all the characters entered?&lt;br /&gt;
&lt;br /&gt;
Here's my code:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#define SIZE 100&lt;br /&gt;
&lt;br /&gt;
int findChar(char array[], char c);&lt;br /&gt;
int findCount(char array[], int c);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int count;&lt;br /&gt;
    int position;&lt;br /&gt;
    int frequency;&lt;br /&gt;
    char ch, array[SIZE];&lt;br /&gt;
    &lt;br /&gt;
    printf("Enter a character : \n");&lt;br /&gt;
    &lt;br /&gt;
    for(count = 0; ((array[count] = getchar()) != '\n'); ++count);&lt;br /&gt;
    array[count+1] = '\0';&lt;br /&gt;
    &lt;br /&gt;
    printf("Search a character : \n");&lt;br /&gt;
    &lt;br /&gt;
    ch = getchar();&lt;br /&gt;
    position = findchar(array, ch);&lt;br /&gt;
    frequency = findCount(array, ch);&lt;br /&gt;
    &lt;br /&gt;
    if(position == -1)&lt;br /&gt;
    {&lt;br /&gt;
                printf("Not found! \n");&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        printf("%c is found in the position of %d", ch, position+1);&lt;br /&gt;
        printf("The count of %c is %d \n", ch, frequency);&lt;br /&gt;
    }&lt;br /&gt;
    system("pause");&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int findChar(char array[], char c)&lt;br /&gt;
{&lt;br /&gt;
    int i, j;&lt;br /&gt;
    for(i = 0; array[i] != '\0'; i++)&lt;br /&gt;
    {&lt;br /&gt;
          if(array[i] == c)&lt;br /&gt;
          {&lt;br /&gt;
                      return i;&lt;br /&gt;
          }&lt;br /&gt;
    }&lt;br /&gt;
    return -1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int findCount(char array[], int c)&lt;br /&gt;
{&lt;br /&gt;
    int i;&lt;br /&gt;
    int j = 0;&lt;br /&gt;
    &lt;br /&gt;
    for(i = 0; array[i] != '\0'; i++)&lt;br /&gt;
    {&lt;br /&gt;
          if(array[i] == c)&lt;br /&gt;
          {&lt;br /&gt;
                      j++;&lt;br /&gt;
          }&lt;br /&gt;
    }&lt;br /&gt;
    return j;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/429000/429000/c-compiler-error-message/</guid>
      <pubDate>Sun, 01 Jul 2012 12:59:13 -0700</pubDate>
      <category>C and C++</category>
    </item>
  </channel>
</rss>