! C question: what is wrong with this ?

This is a discussion on ! C question: what is wrong with this ? within the C Programming forums, part of the General Programming Boards category; Hello all, Can anyone tell me what is wrong with this setup? Error: Type mismatch in parameter 'string' in call ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 02:57 PM
  5. Math Question, hard
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 12-08-2001, 10:58 AM

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