Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Passing an ArrayCtrl / SqlArray to a function template
Passing an ArrayCtrl / SqlArray to a function template [message #49276] Mon, 15 January 2018 11:51 Go to previous message
Giorgio is currently offline  Giorgio
Messages: 184
Registered: August 2015
Experienced Member
Hi folks,
I am creating a small util library for my applications (actually, is a namespace).

I use frequently a method to export the content of a SqlArray /ArrayCtrl to a csv file, so it makes sense to include it in this library.

template <class T>
	void ExportCSV(T o)
	{
		String filename = "";
		FileSel fs;
	
		CoInitialize(NULL);
		PWSTR path = 0;
		SHGetKnownFolderPath(FOLDERID_Desktop, KF_FLAG_SIMPLE_IDLIST, NULL, &path);
		std::wstring s = path;
		std::string homedir( s.begin(), s.end() );
		homedir.append("\\");
		CoTaskMemFree(path);
		
		fs.Type("CSV", "*.csv");
		fs.PreSelect(homedir);
		if(!fs.ExecuteSaveAs()) return;
		filename = fs;
		SaveFile(filename, "Prova");
		FileOut out(filename);
		if(!out) {
			Exclamation(t_("Failed opening ") + filename);
			return;
		}
		
		out.Put(o.AsCsv());
	}


When I compile I get the following error:

error C2280: 'Upp::ArrayCtrl::ArrayCtrl(Upp::ArrayCtrl &)': attempting to reference a deleted function

I know this is a really generic question, but I am bit lost.

Regards,
Gio
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: build methods
Next Topic: StreamRasterEncoder?
Goto Forum:
  


Current Time: Thu Dec 05 23:56:51 CET 2019

Total time taken to generate the page: 0.01066 seconds