View Single Post

  #3 (permalink)  
Old 07-16-2009, 11:27 AM
prashanth_kmr prashanth_kmr is offline
Junior Member
 
Join Date: Jul 2009
Posts: 1
prashanth_kmr is on a distinguished road
By data binding I'm assuming that means storing data in a variable. I'm not familiar with that term, but my guess seems to make sense. Yes, one of the principles of the C++ language is the ability to store data in variables for program use. A simple example would be an integer: int x = 5; There now we have just binding the number "5" to the variable "x". "x" can be substituted for 5 anywhere within the scope of that variable now. A function is a way of writing common code such that you don't have to copy and paste code all over your program. For example, maybe you need to ask 5 people for their user names and passwords in a program. Instead of copying and pasting the code to do that 5 times you can put it in a function and just call the function 5 times instead.
Reply With Quote