espressif32/cores/esp32/HardwareSerial.h:49:10: fatal error: functional: No such file or directory

I have a project and book my software in a repository every day. This error just appear when I just tried to recompile my project, I pull the repo with the same error. I even delete the .platform IO directory, and VS and re-install everything again.
Error is in the esp library.
C:/Users/Gerrie/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.h:49:10: fatal error: functional: No such file or directory
in the file"HardwareSerial.h" it looks like this

Pay attention: the baudrate returned by baudRate() may be rounded, eg 115200 returns 115201
*/
#ifndef HardwareSerial_h
#define HardwareSerial_h
#include <inttypes.h>
#include
#include “Stream.h”
#include “esp32-hal.h”
#include “soc/soc_caps.h”
#include “HWCDC.h”

Any Ideas to fix this… The code used to compile fine, just a few days ago.

look like the like the one like the text disappear
Pay attention: the baudrate returned by baudRate() may be rounded, eg 115200 returns 115201

*/

#ifndef HardwareSerial_h
#define HardwareSerial_h
#include <inttypes.h>
#include => error
#include “Stream.h”
#include “esp32-hal.h”
#include “soc/soc_caps.h”
#include “HWCDC.h”

I don’t believe it it gone again
#include <functional.h>

Ok, I found the error. The one file had a “.c” extension instead of “.cpp”. The moment I started to use the module the error occurred. The moment I renamed the file to cpp it compiled.