RE: Where did I go Wrong on this coder?

You are viewing a single comment's thread from:

Where did I go Wrong on this coder?

in c •  6 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.)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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