IAR Embedded Workbench compile errors trying to use C++

Hi,

I am trying to use C++ on a sample project for STM Nucleo board.

Language option on IAR project is basically C, but I wanted to try C++.

Here I could this by changing the option as:

From Project option - C/C++ Compiler - Language1 - Language - C

To     Project option - C/C++ Compiler - Language1 - Language - C++

But, if I just choose Language - Auto ( extension-based) rather than C++,

compile errors happen although codes are the same : 

===============================================

Error[Pe020]: identifier "class" is undefined 

Error[Pe065]: expected a ";" 

Warning[Pe012]: parsing restarts here after previous syntax error 

===============================================

For C++ codes, I just included in the project class.cpp and class.h containing very simple C++ class.

I can't find any clue to solve this problem on the IAR website.

Please share your tips if you already experienced this before.

Thanks.

More questions in this forum