Author Topic: Help File issue "using namespace std;"  (Read 107 times)

jcfuller

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Help File issue "using namespace std;"
« on: August 03, 2020, 08:25:46 AM »
Robert,
  Using C++ in BCX
$CPPHDR

Remove
using namespace std;

which is not added any more. It started causing havoc after one of the VSCPP 2019 updates because of it's location in the c++ source.

I add this to my source so I don't have to add std:: to all the cout's and such.
I know it's not recommended but it is shown in many c++ examples across the web.

$CCODE CONST
  using namespace std;
$CCODE

Maybe an item somewhere to show how to add using namespace std;

James

Robert

  • Sr. Member
  • ****
  • Posts: 449
    • View Profile
Re: Help File issue "using namespace std;"
« Reply #1 on: August 03, 2020, 01:43:33 PM »
Robert,
  Using C++ in BCX
$CPPHDR

Remove
using namespace std;

which is not added any more. It started causing havoc after one of the VSCPP 2019 updates because of it's location in the c++ source.

I add this to my source so I don't have to add std:: to all the cout's and such.
I know it's not recommended but it is shown in many c++ examples across the web.

$CCODE CONST
  using namespace std;
$CCODE

Maybe an item somewhere to show how to add using namespace std;

James

Hi James:

Thank you for the bug report. The problem has been fixed.

It's odd, I thought that had been removed when the "using namespace std;" was taken out of the examples.

Good eye.