[ create a new paste ] login | about

Link: http://codepad.org/qtziBtNv    [ raw code | output | fork ]

C++, pasted on Aug 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void MnemosyManager::SaveLastEntries ()
	{
		auto entries = Model_->GetEntries ();
		qSort (entries.begin (), entries.end (),
				[] (const FriendsEntry& left, const FriendsEntry& right)
				{
					return left.GetPostDate () > right.GetPostDate ();
				});

		QDir dir (QStandardPaths::writableLocation (QStandardPaths::DataLocation));
		if (!dir.exists ())
			dir.mkpath (QStandardPaths::writableLocation (QStandardPaths::DataLocation));

		QSettings settings (QStandardPaths::writableLocation (QStandardPaths::DataLocation));
		settings.setValue ("entries", QVariant::fromValue<FriendsEntries> (entries));
	}


Output:
1
2
Line 1: error: 'MnemosyManager' has not been declared
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: