奇怪的bug
#include "coordinate.hpp"
#include <iostream>
using namespace std;
Coordinate::Coordinate()
{
cout<< "this construct of Coordinate" <<endl;
}
Coordinate::~Coordinate()
{
cout<< "this destruct of Coordinate" <<endl;
}
void Coordinate::setX(int x)
{
m_intX = x;
}
在写setX方法时,ide xcode报错:expected ';' after top level declaration.
网上搜了各种解决方法都无效。还请老师释疑。