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'
User Profile
Collapse
-
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 : ')'Leave a comment:
-
[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'Leave a comment:
-
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;
...Leave a comment:
-
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???
-------------------------------------------------------------------------------------------------------------...
No activity results to display
Show More
Leave a comment: