I have a project with a main.cpp and a main.h and several classes. Each class gets its own .cpp and .hpp file. I’ve been using
#include <iostream >
in a couple of class header files without issue. However, now I’d like to add it to main.h and I get this error:
iostream: No such file or directory
I didn’t think the extension for header files and source files matter but I’ve tried main.hpp and main.c anyhow and that didn’t seem to help. Here’s my main.h.
#ifndef __MAIN_H
#define __MAIN_H
#include
<stdint.h>
#include
<iostream>
#include "stm32h7xx_hal.h"
#include "stm32h7b3i_discovery_sd.h"
#include "stm32h7b3i_discovery.h"
#include "FatFsErrorCodes.h"
void Error_Handler(void);
#endif /* __MAIN_H */
I’ve tried various ways to get around this but nothing has worked so far. Any suggestions will be greatly appreciated.
Thanks
-
This topic was modified 3 years, 3 months ago by GeneM.
-
This topic was modified 3 years, 3 months ago by GeneM.
-
This topic was modified 3 years, 3 months ago by GeneM.
-
This topic was modified 3 years, 3 months ago by GeneM.
-
This topic was modified 3 years, 3 months ago by GeneM.
-
This topic was modified 3 years, 3 months ago by GeneM.