Even if the forum is about an IDE, I woud try to guess what is wrong
First of all, you cannot compile such things in C, you need a C++ compiler, therefore, a C++ project.
(1) The first program will not compile in C. That's because you need classes and custom defined operators '+' and '*' for it. Nothing like that is supported in C. The statement "complex c = 2 + 3*I;" is an error in C.
(2) The second program can compile in C, providing you have defined a structure "_complex". Usage of that structure is the same as usage of any other structure:
c.re = 2;
c.im = 3;
but this is not the thing you have wanted most likely. Therefore, switch to C++ and make sure you are writing a C++ project.