samedi 5 février 2022

Program works on GCC 7.5 on PC but not on online compiler

I have the following program that compiles successfully on my machine using GCC 7.5.0 but when i try out the program here the program doesn't work.

class Foo 
{
    friend void ::error() { }

};
int main()
{
    
    return 0;
}

The error here says:

Compilation failed due to following error(s).

    3 |     friend void ::error() { }
      |                         ^

My question what is the problem here and how can i solve it.

Aucun commentaire:

Enregistrer un commentaire