Follow Us On Follow us on Facebook Follow us on Twitter Watch us on YouTube
Results 1 to 3 of 3
  1. #1
    dawn2rock's Avatar
    dawn2rock is offline Beginner
    Join Date
    Jan 2005

    Question api's n function

    can anyone tell me diff b/w api's n fuctions

  2. #2
    knight_guitar's Avatar
    knight_guitar is offline Lead Guitarist
    Join Date
    Oct 2005
    Dude it's better of u search for that on "Ask" or "whatis"

    But API's (Application Programming interface) , is totally different from functions i'll try to give u a brief example

    now taking API's first.. now JAVA as i said in some of my earlist posts that it got like "27 API's" , like "struts, swings, javascript, jsp, EJB's" etc. etc.

    but this might not clear ur doubts ok think this in the manner like there are different types of people around the world like "mangaloian, blondes, black, indians etc. etc." they all have 2 ears, 2 eyes , one nose etc. etc. there physical structure is quite same but they all speak different languages and follow different culture this won't be a perfect example of API's but it will give u an idea what API's are about

    now Functions

    Functions mean a little program, written on particular language and can be used for that particular language (depends on which platform u working)
    They are small programs , which can be call whenever they are required in main program or main function

    let's say..

    i've made this small function in C++

    Void show()


    cout<<"\n hello";


    now i can call this "show" function later in any of my program whenever i require

    i can call that function later on in the main program

    so that's what's actually API's and Functions are !!

    u can get much stuffs from ASK and whatis.. if u did'nt understand what i tried to made ya understand there..
    _________/\_________ .. see ya on the dark side of moon....

  3. #3
    Join Date
    Dec 2004
    Functions can be called from anywhere within the scope of the program. They can be written by u, someone else or provided by the OS at runtime.
    The ones that r called at runtime by the OS r called APIs. i.e. an API is a set of functions provided by the platform u r working on.... maybe an OS or some middleware like JAVA, BREW etc. when u compile a program which uses API functions thecompiler does not put the call address of the function as it wud for conventional functions at the call location but instead places a MACRO of the API which has a format that is pre-determined by the OS/Middleware so that when execution reaches that point correct API is recognized by the OS.
    #ifndef __NONSENSE__
    #define __NONSENSE__

    #include <religiousviolence.h>
    #include <dirtypolitics.h>
    #include <popularculture.h>

    BOOL lesson_learnt = FALSE;

    void History()
    if(Checkstabiity(fanaticism) && CheckCorruption(BoomingEconomy) && CheckPublicDesire(SocialProblems))
    lesson_learnt = TRUE;

    History(); //repeat History


    Link error ...commonsense32.lib missing...
    ld returned status 1..



Similar Threads

  1. Suggest songs to play in college annual function
    By h1k1j in forum Hindi Guitar Tabs - Submit or Request
    Replies: 1
    Last Post: 09-29-2012, 05:11 PM
  2. req:the name of the some pakistani songs to play in the school function of 14th aug
    By lucku in forum Pakistani Guitar Tabs - Submit or Request
    Replies: 11
    Last Post: 08-11-2005, 05:26 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO