Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,688 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,294 people online right now. Registration is fast and FREE... Join Now!




Data-Driven and Function-Driven

 
Reply to this topicStart new topic

Data-Driven and Function-Driven

reCoded
post 4 Sep, 2008 - 03:38 PM
Post #1


D.I.C Head

**
Joined: 25 Feb, 2008
Posts: 159

Hey guys,

Data-driven method initializes the data at compile time.
Function-driven one generates the data at run-time.

Can anyone give me an example of the two in code. Something simple and/or just explain.

Thanks,
reCoded
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 4 Sep, 2008 - 08:18 PM
Post #2


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,858



Thanked 47 times

Dream Kudos: 550
My Contributions


Well not really sure if the above definitions are really good ones.

But for an example a "DataDriven" example may be the getRoman() function from this post. It uses a look-up table to do a conversion to roman numerals.

For a "function-driven" example you can look at any function that calculates something -- for example the classic factorial.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/23/08 07:30AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month