•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 401,691 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,778 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1969 | Replies: 19 | Solved
![]() |
•
•
Join Date: Nov 2005
Posts: 39
Reputation:
Rep Power: 3
Solved Threads: 0
when i compile this program
it gives the Floating point formats not linked
but when i run this
<< moderator edit: fixed
it gives no error
i got the explanation of first question as
compiler encounters a reference to the address of a float so this is error
in the second program we are also passing the address of x
thn why not error
is i missing something that is not clear to me
plz explain what is going on in both the program
main()
{
struct emp
{
char name[20];
float sal;
};
struct emp e[10];
int i;
for(i=0; i<=9; i++)
scanf("%s %f", e[i].name, &e[i].sal);
}it gives the Floating point formats not linked
but when i run this
main()
{
float x;
scanf("%f" , x);
}[code][/code] tags >>it gives no error
i got the explanation of first question as
compiler encounters a reference to the address of a float so this is error
in the second program we are also passing the address of x
thn why not error
is i missing something that is not clear to me
plz explain what is going on in both the program
Last edited by Dave Sinkula : Nov 16th, 2005 at 10:26 am.
The first one is because it doesn't see any floating point operations, so the library is not linked. [edit]http://cboard.cprogramming.com/showt...171#post322171
The second one is not correct.
The second one is not correct.
•
•
Join Date: Nov 2005
Posts: 39
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by Dave Sinkula
The first one is because it doesn't see any floating point operations, so the library is not linked. [edit]http://cboard.cprogramming.com/showt...171#post322171
The second one is not correct.
u r saying that second one is not correct what do u mean by this
second one run successfully when i run it
•
•
Join Date: May 2004
Posts: 177
Reputation:
Rep Power: 5
Solved Threads: 9
Whenever you compile C code you should enable warnings. Some compilers will not complain unless you tell them to complain.
What compiler are you using? Is it an ancient version
of BORLAND C++ or TURBO C? You really need to use a modern compiler - there are free ones on the internet starting with gcc.
And in general, don't compile straight C with a C++ compiler even though it seems to work.
What compiler are you using? Is it an ancient version
of BORLAND C++ or TURBO C? You really need to use a modern compiler - there are free ones on the internet starting with gcc.
And in general, don't compile straight C with a C++ compiler even though it seems to work.
•
•
Join Date: Nov 2005
Posts: 39
Reputation:
Rep Power: 3
Solved Threads: 0
oops
Dave Sinkula i don,t see that in hurry
that is
and i am using dev cplusplus 4 version now
but strange there were no problem in both code when i run it on dev 4 version
Dave Sinkula i don,t see that in hurry
that is
scanf("%f" ,&x);and i am using dev cplusplus 4 version now
but strange there were no problem in both code when i run it on dev 4 version
•
•
Join Date: Nov 2005
Posts: 39
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by sunnypalsingh
See This
http://www.daniweb.com/techtalkforums/thread33624.html
YES I SEEN THAT THREAD
i am using devc++ 4.0
and it show that there is no
#include <limits>
c:\doublly_.cpp:5: limits: No such file or directory
and it also not working with
system("PAUSE");
i also include
#include <stdlib.h> directory
what is error
Use <climits> instead of <limits>...there is typing mistake there
and plz see this
http://www.bloodshed.net/faq.html
and plz see this
http://www.bloodshed.net/faq.html
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Installing Windows 98 On VMware. Floppy problem (Windows 9x / Me)
- Windows XP keeps restarting since a new video card (Windows NT / 2000 / XP / 2003)
- Redhat Linux 6.2 - ipop3d problem? (*nix Software)
- Problem with T720 (Gadgets and Gizmos)
- Connection Problems (Networking Hardware Configuration)
- Encoding (Unicode) problem in IE 6.0 (Web Browsers)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
- Javascript/HTML problem!!! (JavaScript / DHTML / AJAX)
- Problem with Windows Update and WinXP (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: counts how many times the number 5 appears in array?
- Next Thread: C++ Help. plzzzzzz



Linear Mode