The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
Called object is not a function?
Discuss Called object is not a function? in the C Programming forum on Dev Shed. Called object is not a function? C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 8th, 2012, 05:24 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 24
Time spent in forums: 6 h 27 m 36 sec
Reputation Power: 0
|
|
|
Called object is not a function?
Hello,
I don't understand what is the wrong. In main i call a function left() and i have this error from Cygwin "main.c:31: error: called object is not a function " Can anybody help me?
[
Code:
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <stdbool.h> #include "left.h" #include "rotation.h" #include "start.h" #include "up.h" #include "extern.h" main() { typedef struct { int x ; int y ; }joystic; int swich; joystic right; joystic left ; swich=4; right.x=100; right.y=100; left.y=100; start(&swich); // printf("S=%i\n",s); up(&right.x); left(&right.y) ; rotation(&left.y); }
|

November 8th, 2012, 05:45 AM
|
 |
Contributed User
|
|
|
|
|
> Can anybody help me?
Probably not.
You've been at this for over 6 months, yet you still can't be bothered to review your post to make sure it is READABLE to everyone else before you rush to press that submit button.
All on one line code => unreadable, and ignored post.
|

November 8th, 2012, 05:56 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 24
Time spent in forums: 6 h 27 m 36 sec
Reputation Power: 0
|
|
Sorry,
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include "left.h"
#include "rotation.h"
#include "start.h"
#include "up.h"
#include "extern.h"
main() {
typedef struct {
int x ;
int y ;
}joystic;
int swich;
joystic right;
joystic left ;
swich=4;
right.x=100;
right.y=100;
left.y=100;
start(&swich);
//printf("S=%i\n",s);
up(&right.x);
left(&right.y) ;
rotation(&left.y);
}
|

November 8th, 2012, 07:44 AM
|
 |
Contributing User
|
|
|
|
|
This problem could be mine, but I'd swear there are 30 lines of code with error on line 31. I don't have these apparently joystick libraries and cannot help.
__________________
[code] Code tags[/code] are essential for python code!
|

November 8th, 2012, 07:50 AM
|
 |
Contributed User
|
|
|
|
|
> joystic left ;
One kind of left.
> left(&right.y) ;
Another kind of left.
Do you understand that 'left' is NOT a function.
Hence the error message "error: called object is not a function "
|

November 8th, 2012, 02:03 PM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 24
Time spent in forums: 6 h 27 m 36 sec
Reputation Power: 0
|
|
|
Thank you very much.You have absolutely right!!
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|