Thread: PASSINAG A bidimansional array at a function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    29

    are you kidding?

    well not at all...do you think I'm stupid?
    Can you understand what I wrote?
    Sure It's not possible to pass different bidimesiona arrays with to a function defined f(ina a[2][3]) becouse c++ perform a array member to member copy offcourse!
    But your suppositions letme think you don't understend pretty much what you talk about or reading.....:-|

  2. #2
    Registered User
    Join Date
    Apr 2004
    Posts
    29

    no need something more fine working

    However your solution again doesent perform a by referance passing to the function but performs a copy of the passed array to the local array to the function and if the array passed ad declared in the function proptipe is quite huge time CPU computing an memory space is widely wasted!
    That's not high performed coding...and sound really stupid!

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    and array aren't passed by referance.At least that you specifically specify that.
    Infact you shouldent define a prototipe so:
    f(int b[4][4]);
    int a[4][4];
    to pass an array.. infact
    int a[4];
    f(int *b);
    main()
    {
    f(a); //this is a by referance passing of the a array
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Passing my array to function
    By pooty tang in forum C Programming
    Replies: 8
    Last Post: 09-15-2004, 12:19 PM
  4. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM
  5. 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