Hey guys so I just started a new project on xcode using command line and then I clicked on C++. When I go to source files and then go to main.cpp it doesn't let me click on the build and run button at the top.
using command line and then I clicked on C++
I'm on xcode 3.2.6You need to provide some more information for people to be able to help you. What version of Xcode are you using? Your mention of the Build and Run button tells me you're not using Xcode 4.
When you say the following:
Do you mean you created a C++ command-line tool project?
Are you able to build and run the project from Xcode's menus? Xcode 2 and 3 have a Build menu that has a Build and Run menu item.
If you click the link in my signature, you can find two articles that walk you through the creation of a C++ command-line application project in Xcode. One article covers Xcode 4 and the other covers earlier versions of Xcode.
if i just start a new project and don't edit the default coding at all it still won't let me build and run the project.I'm on xcode 3.2.6
If you create a different type of project, such as a Cocoa application, are the menu items in the Build menu enabled so you can build the project? Have you tried restarting Xcode? Something could have been messed up that a restart would fix.
Yes.by restarting do you mean quitting the application and then starting it again and trying?
Yes.
The only suggestion I can give is to uninstall Xcode and reinstall it. Instructions on how to uninstall Xcode are in the About Xcode and iOS SDK document that comes with Xcode. If uninstalling and reinstalling doesn't work, ask on Apple's Xcode mailing list. Some of Apple's Xcode engineers answer questions on the mailing list.