I having actually trouble recognize a equipment to this error..Thankserror: initializer expression list treated as compound expression

unsigned char mbuffer<16>;int bcd_encode(32768UL, &mbuffer<0>, 4); = cbuffer) { if (number != 0) digit = number % 10; number = number / 10; m++; rather digit = 0; /* If we have an odd-numbered digit place * then conserve the byte and move come the next buffer * position. Otherwise go convert an additional digit */ if (n & 1) { bval |= digit This short article has been edited through jimblumberg: 29 respectable 2013 - 07:44 AMReason because that edit:: Added lacking code tags. Please discover to usage them properly.




You are watching: Expression list treated as compound expression in initializer

\"*\"

#2jimblumberg


\"*\"
\"*\"

Re: error: initializer expression list treated together compound expression

Posted 29 respectable 2013 - 07:50 AM


The compiler is confused, it think you're make the efforts to produce an int variable named bcd_encode, yet you're using different varieties in the initialization list. Is that your will to declare a variable v that name? Or space you do the efforts to speak to your function that has actually that name?You do understand that girlfriend can't contact a duty outside all various other functions, correct? You might want to research the role tutorials had in mine signature.Jim

This article has to be edited by jimblumberg: 29 august 2013 - 07:51 AM


#3lafleur


Re: error: initializer expression perform treated as compound expression

Posted 29 respectable 2013 - 08:15 AM


#4jimblumberg


Re: error: initializer expression list treated as compound expression

Posted 29 respectable 2013 - 08:18 AM


Be certain to call the duty inside one more function, for example:

int main() int bcdNum = bcd_encode(32768UL, &mbuffer<0>, 4); return(0);JimThis write-up has been edited by jimblumberg: 29 august 2013 - 08:18 AM


Re: error: initializer expression list treated as compound expression

Posted 29 august 2013 - 08:20 AM




See more: Integumentary System Labeling Worksheet, Integumentary System Labeling Diagram

I see the authorize now! just how stupid the me...this looks choose it solved the problem....

unsigned char mbuffer<16>;int NX;NX = bcd_encode(32768UL, &mbuffer<0>, 4);