Dec 28, 2020 at 3:22pm UTC
Hello every one! Nice to meeting you on this forum. I am new here also in C++. I have the following question-
Why the following code showing "namespace name expected" error? What should I do to remove this error?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
using namespace std;
int main()
{
cout << "\nSize of Fundamental Types\n" << "Number of Bytes\n" << "-----" << endl;
cout << " char: " << sizeof (char ) << endl;
cout << " short: " << sizeof (short )<< endl;
cout << " int: " << sizeof (int ) << endl;
cout << " long: " << sizeof (long ) << endl;
cout << " float: " << sizeof (float )<< endl;
cout << " double: " << sizeof (double )<<endl;
cout << " long double: " << sizeof (long double )<< endl;
return 0;
}
Last edited on Dec 28, 2020 at 3:23pm UTC
Dec 28, 2020 at 3:32pm UTC
PK Dey , What compiler are you using?
Dec 28, 2020 at 3:37pm UTC
But In Borland C++ compiler The error is displaying! Is there any problem with Borland C++ compiler?
Dec 28, 2020 at 3:41pm UTC
Most likely, what is the exact version of that outdated compiler?
You really should get a newer compiler, there are several available that are free to download.
Dec 28, 2020 at 3:44pm UTC
Thank! I am going to change my compiler
Dec 28, 2020 at 3:52pm UTC
Someone took it over as a project but nothing from borland is newer than 2005, and most of it is from the 1990s or even earlier. You should use something else. If you like borland builder, there is an opensource project or something that continues it?