User Profile

Collapse

Profile Sidebar

Collapse
ashpats
ashpats
Last Activity: Sep 16 '08, 12:10 AM
Joined: Sep 12 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ashpats
    replied to counting vowels in string (c language)
    in C
    thanx guys. i finally finished it.
    the line
    Count = CountVowels(tex t, Count);
    was the problem. i simply changed it to
    CountVowels(tex t, &Count);
    and it appears to be workin'
    See more | Go to post

    Leave a comment:


  • ashpats
    replied to counting vowels in string (c language)
    in C
    well i've changed few lines:

    Count = CountVowels(tex t, Count); to Count = CountVowels(tex t, Count*);

    counter_t CountVowels (char text[], counter_t* Count) to
    void CountVowels (char text[], counter_t* Count)

    end got rid of 'return'. but now i get a syntax error:
    Count = CountVowels(tex t, Count*); error C2059: syntax error : ')'
    See more | Go to post

    Leave a comment:


  • ashpats
    replied to counting vowels in string (c language)
    in C
    [Count = CountVowels(tex t, Count);] error C2440: 'function' : cannot convert from 'counter_t' to 'counter_t *'

    and
    [return (Count);] error C2440: 'return' : cannot convert from 'counter_t *' to 'counter_t'
    See more | Go to post

    Leave a comment:


  • ashpats
    replied to counting vowels in string (c language)
    in C
    well i've improved my code a bit. but it still has some problems. (the program doesn't have to count upper case vowels).

    #include <stdio.h>

    typedef struct {
    int a;
    int e;
    int i;
    int o;
    int u;
    }counter_t;

    counter_t CountVowels (char text[], counter_t* Count);

    int main ()
    {
    char text[100];
    counter_t Count;
    ...
    See more | Go to post

    Leave a comment:


  • ashpats
    started a topic counting vowels in string (c language)
    in C

    counting vowels in string (c language)

    Hey everyone,

    I am supposed to write a program that counts the number of vowels in string of characters.
    It must include "Struct counter_t (it must be declared as in the code i've written)" and function "int CountVowels (IN text[], OUT Count)". the OUT parameter must be of type counter_t. I've written the code but it doesn't seem to work. Can someone help me please???

    -------------------------------------------------------------------------------------------------------------...
    See more | Go to post
No activity results to display
Show More
Working...