C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 8th, 2012, 05:24 AM
Giorgos Giorgos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 24 Giorgos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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);        }

Reply With Quote
  #2  
Old November 8th, 2012, 05:45 AM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,835 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 15 h 20 m 42 sec
Reputation Power: 1774
> 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.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper

Reply With Quote
  #3  
Old November 8th, 2012, 05:56 AM
Giorgos Giorgos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 24 Giorgos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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);        
}

Reply With Quote
  #4  
Old November 8th, 2012, 07:44 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is online now
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,352 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 7 h 49 m 23 sec
Reputation Power: 383
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!

Reply With Quote
  #5  
Old November 8th, 2012, 07:50 AM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,835 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 15 h 20 m 42 sec
Reputation Power: 1774
> 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 "

Reply With Quote
  #6  
Old November 8th, 2012, 02:03 PM
Giorgos Giorgos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 24 Giorgos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 27 m 36 sec
Reputation Power: 0
Thank you very much.You have absolutely right!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Called object is not a function?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap