unable to find numeric literal operator

im using a cottonwood RFID reader and im trying to run this code in an arduino mega

char command_antenna={0x18,0x03,0xFF};//const
char command_inventory={0x43,0x04,0x01,0xcd};//const
int incomingByte;

void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
Serial1.write(command_antenna);
}

void loop()
{
delay(10000);

Serial.println("Tag List");
Serial1.write(command_inventory,8);
delay (1000);

while (Serial1.available())
{

incomingByte = Serial1.read();
if(incomingByte == 6Serial.println(""));
//Serial.print(incomingByte);
Serial.print(incomingByte,HEX);
Serial.print("-");

}

Serial.println("");

}

and i get this message

exit status 1
unable to find numeric literal operator 'operator"" Serial.println'

Please help

Looks like a minor earthquake happened here:

   if (incomingByte == 6Serial.println(""));

do u have any suggestion?

bennykf:
do u have any suggestion?

You tell us what that line is supposed to do

bennykf:
do u have any suggestion?

I'd try one of these )

You can have that one, it's a spare I carry around.

You probably also need a pair of these '

I'm afraid I'll have to charge for that one.

it supouse to give me the 16 bits epc

Are you looking at the same thing we are?

Do you really expect that "incomingByte" is ever going to be equal to "6Serial.println("")"?

Steve

Do you really expect 6Serial.println("") to ever be anything other than a syntax error?

What on earth are you trying to do with that line?!

DrAzzy:
Do you really expect 6Serial.println("") to ever be anything other than a syntax error?

Yeah, you need a space there to make it work. :wink:

struct Foo {
 void print(const char *);
};

Foo operator ""Serial(const char*) {
 Foo a;
 return a;
}

void hoo()
{
 6Serial .print("");
}

However, you will get a warning:

goop.cc:5:14: warning: literal operator suffixes not preceded by '_' are reserved for future standardization
 Foo operator ""Serial(const char*) {
              ^

http://en.cppreference.com/w/cpp/language/user_literal

  if (incomingByte == 6Serial.println(""));looks suspiciously like an attempt to print a blank line if incomingByte equals 6 but reply #5 seems to indicate not.