G
gk245
I have something like this:
#include <stdio.h>
#include <ctype.h>
#include <strings.h>
struct sentence get_sentence (char string[])
{
struct sentence my_sentence
{
int count_1;
int count_2;
int count_3;
};
// Add for-loop to count numbers, uppercase letters (isupper),
//lowercase(islower), etc.
return(mysentence)
}
However, even before i add the for-loop, i cannot compile it. An error
comes up saying that the "return type is an incomplete type".
Basically, the problem asked me to count the number of
uppercase/lowercase letters and digits in a string. Then return that
as a structure.
Thanks.
#include <stdio.h>
#include <ctype.h>
#include <strings.h>
struct sentence get_sentence (char string[])
{
struct sentence my_sentence
{
int count_1;
int count_2;
int count_3;
};
// Add for-loop to count numbers, uppercase letters (isupper),
//lowercase(islower), etc.
return(mysentence)
}
However, even before i add the for-loop, i cannot compile it. An error
comes up saying that the "return type is an incomplete type".
Basically, the problem asked me to count the number of
uppercase/lowercase letters and digits in a string. Then return that
as a structure.
Thanks.