Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Functions in C++?

  • Please log in to reply
2 replies to this topic

#1 TelMeDragon


  • Members
  • 80 posts
  • Local time:07:08 AM

Posted 29 April 2009 - 01:37 AM

I'm not really understanding what a function is. From what I've gathered, it's the equivalent of a method in Java? I'm not a long time practioner in both of these languages, I'm actually learning them at the same time, so forgive me if my terminology is incorrect.
Posted Image

BC AdBot (Login to Remove)


#2 Romeo29


    Learning To Bleep

  • Members
  • 3,194 posts
  • Gender:Not Telling
  • Location:
  • Local time:07:08 AM

Posted 29 April 2009 - 09:32 AM

Yes you are right. Method in Java and functions in C++ are similar.

#3 groovicus


  • Security Colleague
  • 9,963 posts
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:08 AM

Posted 29 April 2009 - 10:49 AM

The only difference between a method and a function is that sometime one needs to declare a prototype for a function, whereas there is no such need for a prototype in Java. Other than that, they are a language-particular means of identifying an independent section of code.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users