expected unqualified-id before 'reinterpret_cast'

Arduino: 1.0.6 (Windows 7), Board: “Arduino Uno”
metronomov2:15: error: expected unqualified-id before ‘reinterpret_cast’
metronomov2:15: error: expected )' before 'reinterpret_cast' metronomov2:15: error: expected unqualified-id before ')' token metronomov2:240: error: expected unqualified-id before 'reinterpret_cast' metronomov2:240: error: expected )’ before ‘reinterpret_cast’
metronomov2:240: error: expected unqualified-id before ‘)’ token

The program points out the error in the line 15.

I think it’s a syntax error, but I couldn’t find it. Help? D:
The code is in the attachment.

metronomov2.ino (7.2 KB)

txt version.txt (7.53 KB)

You are somewhat more likely to get a speedy reply if you post the relevant part of your code in the post using code tags.

If the error is in line 15, the first 20 lines should do.

I am disinclined to download your file ( which won't display legibly anywhere except the arduino ide ), put it on a usb stick, boot up the other computer with the arduino ide on it, just to look at your crummy code. And I'm probably not the only one.

I seriously doubt the error is in the first 20 lines, you’ll agree if you take a look.
Also, the error only showed up when I was writing some of the last voids, I tested the first parts over and over and didn’t change them. I’ll not post 356 lines of code using code tags.

metronomov2:15: error: expected unqualified-id before 'reinterpret_cast'

I am quite sure there is an error near line 15 ? Can you figure out why I think this ?

I'm sure someone will come along soon, who does their internet browsing and arduino development on the same computer, who doesn't have the same obstacle as me to solving your problem.

Michinyon, I seriously don't know why are you saying that. I posted the .ino AND a .txt version.

This is your problem:

void F(){
digitalWrite( 5, LOW);
digitalWrite( 7, HIGH);
digitalWrite( 4, HIGH);
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite( 3, LOW);
digitalWrite( 6, LOW);

The identifier 'F' is already used as a macro name, use a different name for your function.

Line 15 looks OK, doesn't it.

The problem with line 240, is probably that your function F( ) clashes with the F( ) macro (or function or whatever it is) that is used for the "progmen" functionality - storing constant variable data in the program flash memory instead of RAM.

Try renaming your function F( ) at line 240, to something else.

As for line 15, I can see nothing wrong with it. The compiler doesn't like it, though. One possibility is that the identifier NOTE_F2 is already defined somewhere else. Try renaming it.

Another possibility, is that you have somehow managed to type an invalid invisble character in that line. Like, for example, a tab character. Tab characters are actually legal but there are some other invisible characters which are not. Try deleting line 15 and typing it in again.

Michinyon, I seriously don't know why are you saying that. I posted the .ino AND a .txt version.

You only posted the .txt version AFTER I complained it was a hassle to look at the .ino

As I explained, for me at this time, it is a major inconvenience to look at your .ino file. For me, and probably some others. Not for everybody.

As a general concept, when you are seeking help or advice, you want to make it as easy as possible for people to help you. Not make it hard for people to help you.

I looked at your txt file. I can do that, on this computer.

One way to find out if your #define is clashing with something else, is code like this:

#ifdef NOTE_F2

If you put this in just before you try to define NOTE_F2, it will tell you if there is already a conflicting definition of it.

Works like a charm! Thank you very much guys, I owe you.