开发者

Can Xcode recognize class variables in C++

For example, this simple class:

class Test
{
 public:
 Test();
 int _public;
};

Test::Test()
{
  this->_public = 0;  // Shows _public in color
  _public = 5;        // Stay White
}

This seem to w开发者_Python百科ork for Cocoa apps, but not on C++.

Just to be a bit clearer from my original post, this DOES compile and run exactly as expected.

The only impact from Cocoa to C++ is the syntax highlighting. I know that this is only a dev "feature" and shouldn't in any case be seen as a "must have" from the compiler it's just that since it's working for Cocoa why not C++ right ? Give developers a nice feature and they'll want instantly even more :)

Is a fix available ?


You are right, in Xcode 3 it doesn't work. Xcode 4 however does fix this, as it uses a much deeper integration of the compiler. It's not out yet (if you have a developer account you can download a preview), but it will probably be released soon, patience ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜