Borland C++ 5.02
Borland C++ 5.02
(OP)
Hi Guys! When run the code below in my Borland C++ 5.02 i get the error msg "Must use C++ for the type iostream." But i am using C++. My frens says theres an option that allows u to either compile in C or C++. If that is true, where do i change it so that i can compile the following program.
#include <iostream>
int main()
{ int i = 10, j=20;
int k = (i+j)/2;
std::cout << "i is " <<i
<<" and j is " << j << std::endl;
std::cout << "average is "<< k
<< std::endl;
return 0;
}
#include <iostream>
int main()
{ int i = 10, j=20;
int k = (i+j)/2;
std::cout << "i is " <<i
<<" and j is " << j << std::endl;
std::cout << "average is "<< k
<< std::endl;
return 0;
}
RE: Borland C++ 5.02
James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
RE: Borland C++ 5.02
John Fill

ivfmd@mail.md
RE: Borland C++ 5.02
RE: Borland C++ 5.02
John Fill

ivfmd@mail.md
RE: Borland C++ 5.02
James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
RE: Borland C++ 5.02
James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
RE: Borland C++ 5.02
just try to change the node type from c to cpp as well as extension of ur source file must be *.cpp n it will work fine.
ComputerJin
RE: Borland C++ 5.02
I think that if the compiler demands that the file has a specific extension, then there is something wrong here!! Come one, it's just a plain text file!!
Sure, perhaps the compiler more easily senses whether it is a C++ or C program but I still think it’s a bit awkward!!
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work