- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey there
its driving me nuts. to me it seams fine but the compiler complains. maybe somebody knows what i'm doing wrong. well i have a structure :typedef struct
{
long start;
long end;
}range;
then there is a function: range get_range(int max)
{
range borders;
:
:
return borders;
}
and my main program: :
range borders;
borders = get_range(1000);
:
right there where i try to assign the return value of "get_range" to "borders" i get the error from the compiler "incompatible types in assignment". thanks in advance rico
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rico,
Is there a prototype for get_range occurring somewhere before the use of it in the assignment? Bill- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And so simple it is. The prototype was wrong.
Thanks very much :)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page