Affiliate Programs
 
Search affiliate programs for: 
Affiliate Categories
» Affiliate Networks
» Ad Networks
» 2 Tier Programs
» Pay Per Sale
» Pay Per Lead
» Residual Income
» Datafeeds
» Multi Tier Programs
» Business Opps
» Other Programs

Newsletter
Get newly added affiliate programs by email. Enter your email here:
Article Categories
» Affiliate Marketing
» Business
» Ecommerce
» Hosting
» Marketing
» Sales
» Web Designing
» Webmasters
» SEO & Promotion
» Working At Home
» Other Articles
» Affiliate Glossary


Go Back   AffiliateSeeking Forum > Website Creation, Design & Maintenance > Programming

Programming Get help with creating your scripts/software or help others. Discuss anything relating to programming. Includes PHP, Perl, C++, ColdFusion, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-18-2011, 05:32 PM
SeoDezin SeoDezin is offline
Senior Member
 
Join Date: Feb 2011
Posts: 134
SeoDezin is on a distinguished road
Default Role of Functions

What is role of functions in C++ language?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-03-2011, 04:41 PM
mwmurphy mwmurphy is offline
Junior Member
 
Join Date: Mar 2011
Location: Halifax NS
Posts: 15
mwmurphy is on a distinguished road
Functions perform functions. They allow code re-use.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2011, 10:49 AM
exe problems exe problems is offline
Junior Member
 
Join Date: Apr 2011
Posts: 19
exe problems is on a distinguished road
So function in a C program has some properties discussed below.

•Every function has a unique name. This name is used to call function from “main()” function. A function can be called from within another function.

•A function is independent and it can perform its task without intervention from or interfering with other parts of the program.

•A function performs a specific task. A task is a distinct job that your program must perform as a part of its overall operation, such as adding two or more integer, sorting an array into numerical order, or calculating a cube root etc.

•A function returns a value to the calling program. This is optional and depends upon the task your function is going to accomplish. Suppose you want to just show few lines through function then it is not necessary to return a value. But if you are calculating area of rectangle and wanted to use result somewhere in program then you have to send back (return) value to the calling function.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2011, 05:21 AM
richerdjohn richerdjohn is offline
Member
 
Join Date: Mar 2011
Posts: 54
richerdjohn is on a distinguished road
Function is play vital role to promote the site.With the help function we can promote our site and link.We can introduce himself and his site.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-11-2011, 06:47 AM
eashan eashan is offline
Member
 
Join Date: Mar 2011
Posts: 40
eashan is on a distinguished road
function is define class . function is function name
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-12-2011, 12:18 PM
jenny3103 jenny3103 is offline
Member
 
Join Date: Apr 2011
Posts: 39
jenny3103 is on a distinguished road
Function is used to write code which is use many times in code. Means when we use function in coding then no need to write same code again and again . you have to just call that function whenever yo u need .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-13-2011, 05:38 AM
nhnaaldaia's Avatar
nhnaaldaia nhnaaldaia is offline
Member
 
Join Date: May 2011
Location: Earth
Posts: 48
nhnaaldaia is on a distinguished road
Default Use function we can structure...

Use function we can structure our program in a more modular method, access all the probable to planned programming be able to offer us in C++.

Example of the function
-----------------------
// function example
#include <iostream>
using namespace std;

int addition (int a, int b)
{
int r;
r=a+b;
return (r);
}


int main ()
{
int z;
z = addition (5,3);
cout << "The result is " << z;
return 0;
}

Output is
8

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-13-2011, 07:59 AM
danieljames123 danieljames123 is offline
Member
 
Join Date: May 2011
Posts: 70
danieljames123 is on a distinguished road
If you bethink the syntax of a action declaration:
type name ( argument1, argument2 ...) statement
you will see that the declaration begins with a type, that is the type of the function itself.
Imagine that we want to make a function just to show a message on the screen. We do not need it to return any value.
__________________
php web development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-13-2011, 08:33 AM
nhnaaldaia's Avatar
nhnaaldaia nhnaaldaia is offline
Member
 
Join Date: May 2011
Location: Earth
Posts: 48
nhnaaldaia is on a distinguished road
Quote:
Originally Posted by danieljames123 View Post
If you bethink the syntax of a action declaration:
type name ( argument1, argument2 ...) statement
you will see that the declaration begins with a type, that is the type of the function itself.
Imagine that we want to make a function just to show a message on the screen. We do not need it to return any value.
Thanks a lot for the replay..@jenny3103
A function is independent and it can perform its task without intervention from or interfering with other parts of the program.
__________________
software developer in reputed Software Development Company
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-14-2011, 08:17 AM
danieljames123 danieljames123 is offline
Member
 
Join Date: May 2011
Posts: 70
danieljames123 is on a distinguished road
Its ok. I always ready to help. I am feel good when I helped anyone.
__________________
php web development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 07-04-2011, 12:58 PM
Loan2day Loan2day is offline
Member
 
Join Date: Jun 2011
Posts: 80
Loan2day is on a distinguished road
Function basically avoids the re usability of the code. its a block of statement which are to be implemented when ever necessary.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 07-15-2011, 01:32 PM
amkeabhi123 amkeabhi123 is offline
Senior Member
 
Join Date: Jul 2011
Posts: 111
amkeabhi123 is on a distinguished road
Send a message via Skype™ to amkeabhi123
function can used the recall the method every where ,according the c++ ,because the C++ is OOPs concept follow .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 08-23-2011, 10:02 AM
andrewjohn1 andrewjohn1 is offline
Junior Member
 
Join Date: Aug 2011
Location: USA
Posts: 26
andrewjohn1 is on a distinguished road
A function is a group of statements that is executed when it is called from some point of the program. Using functions we can structure our programs more modular, access to all the potential that we can provide structured programming in C + +.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 09-23-2011, 05:29 PM
pullupbanner pullupbanner is offline
Senior Member
 
Join Date: Sep 2011
Posts: 306
pullupbanner is on a distinguished road
Using functions we can structure our programs in a more modular way, accessing all the potential that structured programming can offer to us in C++.

A function is a group of statements that is executed when it is called from some point of the program. The following is its format:

type name ( parameter1, parameter2, ...) { statements }

where:

* type is the data type specifier of the data returned by the function.
* name is the identifier by which it will be possible to call the function.
* parameters (as many as needed): Each parameter consists of a data type specifier followed by an identifier, like any regular variable declaration (for example: int x) and which acts within the function as a regular local variable. They allow to pass arguments to the function when it is called. The different parameters are separated by commas.
* statements is the function's body. It is a block of statements surrounded by braces { }.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 10-18-2011, 07:53 AM
vikramrandhawa vikramrandhawa is offline
Senior Member
 
Join Date: Sep 2011
Posts: 166
vikramrandhawa is on a distinguished road
A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 10-18-2011, 08:06 AM
tylerlongtw tylerlongtw is offline
Senior Member
 
Join Date: May 2011
Posts: 392
tylerlongtw is on a distinguished road
If anyone need complete information about C++.
Please use this website you have good idea about C++.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB 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 +1. The time now is 04:23 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
© 2004-2011 AffiliateSeeking. All rights reserved.