struct kamp{
int round;
char date[10];
double time;
char homeTeam;
char outTeam;
int homeResult;
int outResult;
int people;
};
typedef struct kamp kamp;
But when i try to use the struct i get an error whitch tells me it is not an array nor a pointer ?
the code where i try to assign a string is below:
void assignDate(kamp matches,char str[],int lines,int lineLen)
{
int i,k;
for (i = 0;i <= lines;i++)
{
for(k = 0;k <=10,k++)
{
matches[i].date[k] = str[9 + (lineLen * i) + k];
}
}
}

New Topic/Question
Reply




MultiQuote




|