request for a member "X" in something not a structure or a union i was programming a Self Balancing    Robot, I am writing the code in vscode using platformio extension.

when i put the code i need to get the angle out of the gyro in another file (named angle.c) and including it in the main program, the ide throws with error, in every line I use the Wire library in the angle.c, however same code copy and paste it in the main program and it works.

P.S. the angle.c is just a file of functions and doesnot have any class.
A .c file is compiled with C compiler. If you include Wire.h which contains a class definition, the C compiler doesn't understand it and generates errors.

If your angle.c file doesn't have C code not compatible with C++, then change the extension of the file to .cpp and it will be compiled with C++ compiler.