Thread: Problem passing double array as a function parameter

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    16
    Quote Originally Posted by laserlight
    From what I see, the compiler needs to know the size of the inner array.

    One solution could be to use a function template:
    Code:
    template <typename T>
    void fn(T matrix, std::size_t size_x, std::size_t size_y)
    {
    }
    Still, have you considered using/writing a matrix class that suits your needs?
    Thanks for the suggestion. Both methods would work, but I don't think they are allow in my assignment. The assignment focus is not on C++ language anyways. I'm just trying to find ways to shorten my code (without overdoing it).
    Last edited by pppbigppp; 06-06-2006 at 03:12 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  5. Passing a double array to a function as an argument
    By Glirk Dient in forum C++ Programming
    Replies: 20
    Last Post: 09-10-2003, 02:54 PM