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 » How do I construct a Vector from a C-style array?
Re: How do I construct a Vector from a C-style array? [message #52426 is a reply to message #52421] Mon, 23 September 2019 11:47 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
laleksic wrote on Sun, 22 September 2019 20:16
Hello,
Given a C-style array (pointer + length), how would I construct a Vector from it?

Edit: To clarify, how do I wrap a Vector around it without copying the data?


	int x[3] = { 1, 2, 3 };
	Vector<int> h;
	h.SetRange(0, SubRange(x, 3));
	DDUMP(h);
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simple way to develope 2D Game
Next Topic: Questions on the editor and hotkeys. And yet.
Goto Forum:
  


Current Time: Fri Jun 07 22:04:27 CEST 2024

Total time taken to generate the page: 0.01134 seconds