it may be the program it was working b4 but it is doing this for other bits of code too. heres what i put in and what it returns with for any code i put in any project. what should i do?
Your code looks correct & works fine for me; behaves exactly as one would expect it too. Try writing it as a stand alone .cpp file (New > C++ File in Xcode...if that's what you are using).
Code:
/*
* hellow.cpp
*
*
* Created by [] on 7/17/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!!" << endl;
return 0;
}
You really don't need that end line after the cout statement. The ; is enough.
Code:
/*
* hellow.cpp
*
*
* Created by [] on 7/17/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!!";
return 0;
}