I have a c and cpp file
mycpp.cpp
fun()
{
//code goes here....
}
mycpp.h
#include<string>
struct str{
std::string a;
};
func();
myc.c
#include "mycpp.h"
func();
//with other c codes..
This is a part of large code list. So it gets compiled via c++ and c. My problem is when mycpp.h is compiled through myc.c (which is included in myc.c) , Compiler throws an error saying fatal error: string: No such file or directory
Is there some wrapper mechanism to overcome this scenario?