U++ framework
Do not panic. Ask here before giving up.

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: 14291
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 19 00:39:12 GMT+2 2026

Total time taken to generate the page: 0.00399 seconds