Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-2008, 07:01 PM
the_transltr the_transltr is offline
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0
the_transltr is on a distinguished road
Default scanf floating point format not linked

I have a code like this:
Code:
#include <stdio.h>

void main(){

   float num[2], 
    int  i = 0;
 
      scanf("%f", &num[i]);
      printf("%2.2f", num[i]);

}
and i'm experiencing a message like: scanf: floating point format not linked.

What's the probem with this?

Last edited by v0id; 03-04-2008 at 11:38 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-06-2008, 06:23 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 507
Last Blog:
Programs Under the Hoo...
Rep Power: 10
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

You first line should be float num[2];. You put a comma instead of a semicolon.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-06-2008, 11:14 PM
dcs dcs is offline
Learning Programmer
 
Join Date: Mar 2008
Posts: 60
Rep Power: 2
dcs will become famous soon enough
Default

Quote:
Originally Posted by the_transltr View Post
What's the probem with this?
It sounds kinda like this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-29-2008, 09:29 PM
the_transltr the_transltr is offline
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0
the_transltr is on a distinguished road
Default Re: scanf floating point format not linked

Quote:
Originally Posted by dargueta View Post
You first line should be float num[2];. You put a comma instead of a semicolon.
I'm sorry about typing error. I did see that. I have resolved the issue. Thanks to all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ C++ ] Drawing Program. Max_Payne C and C++ 6 01-23-2008 09:18 PM
Floating Point random number generator Paradine PHP Tutorials 0 08-26-2007 02:09 PM
large floating point calculations zeos386sx General Programming 5 04-02-2007 02:31 AM


All times are GMT -5. The time now is 02:31 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
LogicKills ........ 20.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads