cancel
Showing results for 
Search instead for 
Did you mean: 

How to include main.c in the Screen1View.cpp?

AWe.1
Associate II

Hello :)

I'm trying to include main.c into Screen1View.cpp but I do not have any idea how to do it.

I need to use array of 64 elements from main file into Screen1View file (the array is called current_temp).

0693W00000GZOdGQAX.pngDoes anyone have any idea how to do it? If so, how the include path should look like?

2 REPLIES 2
MM..1
Chief II
#ifdef __cplusplus
extern "C" {
#endif
 
extern ??? type current_temp[];
 
#ifdef __cplusplus
}
#endif

Zakba.1
Senior

#include "main.h"

extern"C"

{

extern type current_temp[];

}

you would better watch 12 st workshops.