MCUXPRESSO C++ Project Using std Namespace

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCUXPRESSO C++ Project Using std Namespace

1,413 Views
pwhittin
Contributor I

With MCUXPRESSO create a C++ project with access to the 'std' name space

I've followed the 'File -> New -> Project' wizard, accepted all defaults, and created a C++ project with MCUXPRESSO version mcuxpressoide-10.1.1_606 named 'LPC54608J512_Project'.  The project generated compiles, and links without error.

I then replace the blank line 44 with:

std::size_t haha = 0;

and compiling fails with the following error:

../source/LPC54608J512_Project.cpp:44:6: error: 'size_t' in namespace 'std' does not name a type

Any ideas?

1 Reply

1,277 Views
pwhittin
Contributor I

I figured it out!  One must include:

#include <cstddef>