От: | slava_phirsov | ||
Дата: | 16.09.09 11:28 | ||
Оценка: |
#include <iostream>
using std::cout;
using std::endl;
class Foo {
public:
int m_data;
Foo(const int& data):
m_data(data) {};
private:
Foo(const Foo& foo);
};
void proc_foo(const Foo& foo) {
cout << "Data: " << foo.m_data << endl;
};
int main(int argc, char* argv[]) {
proc_foo(Foo(5));
return 0;
};
main.cpp: In function ‘int main(int, char**)’:
main.cpp:13: error: ‘Foo::Foo(const Foo&)’ is private
main.cpp:21: error: within this context