pointers as function variables

This is a discussion on pointers as function variables within the C++ Programming forums, part of the General Programming Boards category; ok, i tried searching for htis with no luck, im wondering cause u use pointers to access data for functions ...

  1. #1
    PHP
    PHP is offline
    Registered User
    Join Date
    Nov 2002
    Posts
    41

    pointers as function variables

    ok, i tried searching for htis with no luck, im wondering cause u use pointers to access data for functions faster, so how do i feed a pointer to a function like so:

    int function(pointer, pointer, pointer)
    {
    }
    ???
    like this:
    int function_name(int* pname, or int *pname, or how?
    In order of learned:
    HTML - Mastered
    CSS - Enough to use
    SSI - Mastered
    PHP - Advanced
    C/C++ - Current Project

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Both of the styles work.

    I think C++ programmers tend to use int* pname, whilst the C guys typically use int *pname, but whatever.

  3. #3
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    Aren't they in the reversed order...
    none...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  2. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 12:03 PM
  3. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 08:10 AM
  4. I need help with passing pointers in function calls
    By vien_mti in forum C Programming
    Replies: 3
    Last Post: 04-24-2002, 10:00 AM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21