以下の例では、私は
MyClass a ();
a は実際には MyClass を返す関数ですが、次の行はどちらも機能しないと言われました。
MyClass b = a();
a.a = 1;
では、 とは何ですか? で何ができますか?
#include "stdafx.h"
#include "iostream"
using namespace std;
class MyClass {
public:
int a;
};
int _tmain(int argc, _TCHAR* argv[])
{
MyClass a ();
// a is a function? what does that mean? what can i do with a?
int exit; cin >> exit;
return 0;
}