Thread: ! C question: what is wrong with this ?

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    28

    ! C question: what is wrong with this ?

    Hello all,

    Can anyone tell me what is wrong with this setup?

    Error:
    Type mismatch in parameter 'string' in call to 'func2' in function func1

    void func1( ... )
    {
    const byte site_string [2] = 'H';

    func2( site_string );
    }

    void func2( const byte string )
    {
    ...
    }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > void func2( const byte string )
    It should be an array
    void func2( const byte string[] )
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 04:22 AM
  2. Newbish Question file reading question....
    By kas2002 in forum C Programming
    Replies: 23
    Last Post: 05-17-2007, 12:06 PM
  3. General forum question - if in wrong forum...
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 05:00 AM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  5. Math Question, hard
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 12-08-2001, 11:58 AM