Well I looked online and some people said that I can use the MacWindows.h to reference it, but its still giving me problems.
Exactly where did you look online, and exactly who said that MacWindows.h is the replacement? Post a specific URL where you read this.
When I google
MacWindows.h, I see this in the top hits:
http://hintsforums.macworld.com/showthread.php?t=89091
It's from 2008. And it pretty plainly says that MacWindows.h has no relationship to windows.h. It also links to a Wikipedia article for windows.h.
Saying that you read something "online" without pointing to it is pretty much worthless in programming. Programming is about details. The exact location where you read something is a crucial detail.
In general, the way to fix this is to isolate the functionality you want (say, screen clearing), and then make platform-specific functions. In particular, write your own clearscreen() function (or whatever it should be called in order to match "windows.h"), and then implement the ANSI escape-code output inside that function.
This is a very common development pattern in the real world. You first define an API. Put it in a header. Then you define an implementation. Then you link the API, the implementation, and your program together.
If part of the implementation is platform-specific, such as the emitting of escape sequences, then inside the implementation you write conditionally compiled code (#if, #else, etc.). The implementation cares about the platform. The rest of your code doesn't.
In the long run, robbieduncan is exactly right: this is what curses was invented for. Don't reinvent the wheel, especially not for a well-known and well-solved problem like this.