Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-04-2005, 04:42 AM   #1
Registered: Sep 2005
Posts: 118

Rep: Reputation: 15
Argument 2 - Pointer Error ?? Easy Fix??

So yet another, final question about the xemacs program I wrote:

I wrote this:

void ConvertTemp (void)
double celsiusTemperature;

/* Prompts the user to enter a celsius temperature for
conversion into fahrenheit temperature. */
scanf("Enter the celsius temperature : %f\n\n",

/* Displays the converted celsius temperature in
fahrenheit temperature. */
printf("%f celsius is %f fahrenheit\n",

I got this error:

travel.c: In function `ConvertTemp':
travel.c:631: warning: format argument is not a pointer (arg 2)


Someone got a fix for this?

Old 10-04-2005, 07:04 AM   #2
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
scanf("Enter the celsius temperature : %f\n\n",
notice the & before the celciusTemperature.
also for posts please put in the line number so that users can see which line the error is directly without having to go through the full code.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer -vo Fatal Error - Easy FIX?? Nadinesky Linux - Software 2 08-23-2005 03:56 PM
Function Pointer as an Argument in C trutnev Programming 5 05-24-2005 10:22 AM
passing function pointer as argument worldmagic Programming 7 08-04-2004 03:33 PM
mdk9.2 problems and a easy fix erik Mandriva 10 11-19-2003 11:16 AM
Mouse Problem - SHould be easy to fix! VIP3R Linux - Hardware 2 05-17-2003 05:39 PM

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration