what is wrong with this function?

This is a discussion on what is wrong with this function? within the C++ Programming forums, part of the General Programming Boards category; EDIT: NVM PROBLEM SOLVED...... (forgot namespace std) /facepalm Code: #include <vector> bool is_equal( const int*ia, int ia_size, const vector<int> &ivec ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    266

    Exclamation [solved]what is wrong with this function?

    EDIT: NVM PROBLEM SOLVED......



    (forgot namespace std)
    /facepalm
    Code:
    #include <vector>
    
    bool is_equal( const int*ia, int ia_size, const vector<int> &ivec )
    {
    //function does nothing yet
    return false;
    }
    compile error:
    1>Compiling...
    1>is_equal.cpp
    1>c:\users\rodrigo\documents\visual studio 2008\projects\primer1\primer1\is_equal.cpp(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\rodrigo\documents\visual studio 2008\projects\primer1\primer1\is_equal.cpp(5) : error C2143: syntax error : missing ',' before '<'
    I bet you see the problem already? whats wrong ;]

    thanks for the help

    (i believe i copied this function signature directly from a book, by the letter...i dont see whats wrong )
    (and if it matters, the other source file i have does compile with this function 'declared' in it)
    Last edited by rodrigorules; 11-22-2009 at 06:01 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

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