You are viewing a single comment's thread from:

RE: Where did I go Wrong on this coder?

in #c6 years ago

The problem is here:

        If( buffer[0] == 0 );
             break;

That If with a capital letter is not the same as if with small letters. So the compiler thinks you're calling a function named If. (The semicolon on the end would be incorrect if this were an if-statement and not a function call.)

The linker complains because it tries to find this function called If (capital letter) but you didn't define it anywhere.

Depending on the compiler flags, you may also get a warning that you are trying to use a function that wasn't declared, but this is technically legal (in some cases.)

Sort:  

You are right. Wow really silly of me. It was in my face. Thanks it executed perfectly.