Go to Post the always so humble metal-in-motion.....i know your tricks; you all are gonna have a killer robot as usual.... - Stephen Kowski [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2008, 11:27
ebowla's Avatar
ebowla ebowla is offline
The Overmind
FRC #2016
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Ewing High School
Posts: 15
ebowla is on a distinguished road
Suspicious pointer conversion

Ive tried looking the answer up in several places and I can't seem to solve it.

Code:
unsigned int analog=(unsigned int)Get_Analog_Value(rc_ana_in01);
printf(analog);
I get an error pointing to the printf statement saying suspicious pointer conversion. The analog imput is a potentiometer. As far as I know everything is wired correctly, the code even compiles and runs, but the printf isnt displaying.

PROBLEM SOLVED CLOSE THREAD/NO MORE POSTS
__________________
Progamming Master
Disclaimer: May not be actually as good as claimed, not reliable for advice, and shirks away any real work.

Last edited by ebowla : 26-01-2008 at 12:13.
  #2   Spotlight this post!  
Unread 26-01-2008, 11:43
JonathanLKS JonathanLKS is offline
Code::Blocks
FRC #0610 (The Coyotes)
Team Role: Leadership
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Toronto
Posts: 36
JonathanLKS will become famous soon enough
Send a message via MSN to JonathanLKS
Re: Suspicious pointer conversion

printf doesn't work that way
You need to have a string, even if your just printing a single int
so you'll need to write it like this
Code:
printf("%d\r\n", analog); //\r\n for newline
__________________

Team 610 [ Co-Leader | Head Programmer | Webmaster ]
We're attending: Greater Toronto Regional, San Diego Regional, Championship
  #3   Spotlight this post!  
Unread 26-01-2008, 12:13
ebowla's Avatar
ebowla ebowla is offline
The Overmind
FRC #2016
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Ewing High School
Posts: 15
ebowla is on a distinguished road
Re: Suspicious pointer conversion

thanks, yea I figured it out on my own with the help of a mentor(who JUST showed up) I apprieciate the help.

PROBLEM SOLVED, CLOSE THREAD/NO MORE POSTS
__________________
Progamming Master
Disclaimer: May not be actually as good as claimed, not reliable for advice, and shirks away any real work.
Closed Thread


Thread Tools
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch WMV Conversion Greg Marra Technical Discussion 4 06-03-2007 17:07
playstation controller conversion jpyro Electrical 6 31-01-2006 17:52
laser pointer 1574aviad Technical Discussion 9 20-02-2005 20:25
PBASIC Conversion Noah Programming 10 07-01-2003 23:33
Suspicious Change to FIRST FAQ Mike375 General Forum 2 28-09-2001 20:24


All times are GMT -5. The time now is 09:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi