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, 08: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-05-2008 at 12:38 AM.
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, 07:23 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
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-07-2008, 12:14 AM
dcs dcs is offline
Programming Expert
 
Join Date: Mar 2008
Posts: 371
Rep Power: 6
dcs has a spectacular aura aboutdcs has a spectacular aura about
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, 10: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
Forum Jump

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


All times are GMT -5. The time now is 11:28 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads