I-Smart MonBusiness
I-Smart MonBusiness

Reputation: 1

I have an error which suggests that I must update includePath otherwise the error is File.h: No such file or directory gcc

SCREENSHOT PICTURE

¨structure with c_cpp_properties.json file

structure with controller.c file

structure with controller.h file

In folder source

The prototype in the file control.h:

#include <stdio.h>
#include <stdbool.h>

double rectangularArea (double width, double height);

The file main.c:

int main(){

    double result;
    result = rectangularArea(10.0,20.0);
    printf("The rectangle air is %f",result);

    return 0;
}

The function in file control.c:


#include <stdio.h>
#include <stdbool.h>
#include  "file.h" // error here

double rectangularArea (double width, double height)
{
    return width * height;
}

Upvotes: 0

Views: 59

Answers (0)

Related Questions