About Use of #include Preprocessor Directive in C++
I stumble on the following compilation error in C++ with g++ compiler:
error on line line 1 with message: invalid preprocessing directive #a(with
a caret above the character a)',which is followed by another,probably
consequent, error on line 4 with message: 'cout was not declared in this
scope'. The editor i am using is Code blocks 10.05 with mingw.I tried
removing .h extension from the iostream file include statement;switching
among different File encoding options;and replacing the angular bracket
with single quotes and double quotes as well.i am stuck on it.Pardon if it
is a duplicate(although i went through several already asked questions in
relevance). The following code illustrates the problem:
#‪include ‬<iostream.h>
int main()
{
cout<< "abc"+8;
cout<< "def"+4;
cout<< "ha";
return 0;
}
No comments:
Post a Comment