I cannot install gcc on my mac. Are there any text editors that can compile C/C++ directly (besides xcode)?
Why can't you install it? You could try using www.codepad.org but it's limited. Another thing you could do is install VirtualBox and run a Linux virtual machine and use GCC on that.
If it is your computer, switch to the admin account to install. If it is not your computer, ask the owner to install it for you as admin.