News
Forums
Search
Members
Sign Up
My Code Newbie
Username
Password
Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET
C.N. Friends
Planet Rome
Link to Us!
Code Newbie
Code Forums
>
Application and Web Development
>
Standard C, C++
what does this mean?
User Name
Remember Me?
Password
Register
FAQ
Calendar
Search
Today's Posts
Mark Forums Read
LinkBack
Thread Tools
Display Modes
10-06-2004, 06:08 PM
#
1
(
permalink
)
Androto
Mac Os X User(I hate win)
Join Date: Oct 2004
Posts: 138
what does this mean?
Code:
float square(int x)
Androto
View Public Profile
Find More Posts by Androto
10-06-2004, 06:25 PM
#
2
(
permalink
)
Valmont
[code][/code] enforcer
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
A function called "square". It wants an integer value and returns after done a floating point value. So basically you could do this:
float val = square(5);
__________________
Valmont
View Public Profile
Find More Posts by Valmont
10-06-2004, 06:28 PM
#
3
(
permalink
)
Androto
Mac Os X User(I hate win)
Join Date: Oct 2004
Posts: 138
would i also be able to do this:
Code:
float square; sqaure = int x;
Androto
View Public Profile
Find More Posts by Androto
10-06-2004, 06:32 PM
#
4
(
permalink
)
Androto
Mac Os X User(I hate win)
Join Date: Oct 2004
Posts: 138
a floating point is a number than can either be a whole number or a decimal, right?
Androto
View Public Profile
Find More Posts by Androto
10-06-2004, 07:10 PM
#
5
(
permalink
)
Valmont
[code][/code] enforcer
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Quote:
Originally posted by Androto
would i also be able to do this:
Code:
float square; sqaure = int x;
No, this specific code is illegal. But your thought is good:
Code:
int x(0); float a = x;
__________________
Valmont
View Public Profile
Find More Posts by Valmont
10-06-2004, 07:12 PM
#
6
(
permalink
)
Androto
Mac Os X User(I hate win)
Join Date: Oct 2004
Posts: 138
ok
Androto
View Public Profile
Find More Posts by Androto
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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
All times are GMT -8. The time now is
07:53 AM
.
Contact Us
-
CodeNewbie.com
-
Archive
-
Top
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO
3.0.0 RC8
Copyright © 2000-2008,
Milano Interactive
Web Hosting provided by
Portal 360 Web Hosting
LinkBack
LinkBack URL
About LinkBacks