Pēcis Beisikāns' Journal
View:Personal Journal.
View:Friends.
View:Calendar.
Missed some entries? Then simply jump to the previous day or the next day.

Thursday, November 15th, 2007

Subject:C++ vector
Time:4:20 pm.
#include <vector>

using namespace std;

class Boo {
public:
	Boo() { };
	Boo(Boo& boo) { };
};

void main()
{
	vector<Boo> v;
	v.push_back(Boo());
}
Error C2558: class 'Boo' : no copy constructor available or copy constructor is declared 'explicit'. Kāpēc?
Comments: Read 2 or Add Your Own.

Subject:C++ const
Time:9:17 pm.
class String
{
public:
	operator char*() { return string; }
protected:
	char* string;
};

void whatever(const char* arg) { }

void funkcija(const String& stuff)
{
	whatever(stuff);
}
Kāpēc const iekš funkcija neļauj veikt konversiju?
Comments: Read 1 or Add Your Own.

Pēcis Beisikāns' Journal

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
Missed some entries? Then simply jump to the previous day or the next day.