Skip to main content
AWe.1
Associate II
November 29, 2021
Question

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

  • November 29, 2021
  • 2 replies
  • 1630 views

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?

This topic has been closed for replies.

2 replies

MM..1
Super User
November 30, 2021
#ifdef __cplusplus
extern "C" {
#endif
 
extern ??? type current_temp[];
 
#ifdef __cplusplus
}
#endif

Zakba.1
Associate III
November 30, 2021

#include "main.h"

extern"C"

{

extern type current_temp[];

}

you would better watch 12 st workshops.