A vector is an array, so of course you can copy over the data. But you can't assign it directly. You have to use a loop.
Type: Posts; User: Elysia
A vector is an array, so of course you can copy over the data. But you can't assign it directly. You have to use a loop.
A vector is an array with dynamic size. Therefore, yes, you can access any element.
You need to brush up on your C++. When you need to do something, look for the available C++ containers and...
o_O
Why do you print code?
>>for(i = 0 ; i<=n; i++)
This is a buffer overrun. Indexes go from 0 to size - 1, so if n is size, then n - 1 is the last element.
Arrays in C++ are tricky, especially since there is no default...