A one-dimensional array data structure. Use 'vector-graphics' for graphic display.
0
votes
0answers
20 views
c++ A sliding sphere (character) on a static 3d mesh made of triangles
I am currently creating a 3d first person game in c++.
For the mechanics of the game I am looking for a way to calculate collision reactions of a player navigating a static scene built up with simple ...
-1
votes
0answers
13 views
Vector Maps for iOS?
I'm trying to build a location based game and i want to create a rich map environment for it.
For that, im looking at technologies that would deliver vector map data onto my device which i can use to ...
0
votes
3answers
53 views
Deleting Vectors By Index Using Iterator?
I have a quick question that's giving me some grief. As part of a much larger project, I want to scan a vector for elements that are 0 and, when I find them, delete them. I'm curious as to why the ...
-1
votes
0answers
10 views
compile errors for vector class
Help; this is the question i meant to ask the other day. i am writing a cpp based on a header file and I keep getting compile errors. Any ideas? The program i wrote is the top.cpp file. Also, any ...
1
vote
1answer
14 views
Using Matlab, how can I group rows by year into a structure?
Using Matlab, I am trying to build a structure that will store grouped rows of matrix X organized by year. The vector yrsStr has each year which will need to be grouped by. Please refer to matrix X ...
0
votes
0answers
67 views
Using “mod (%)” Operator For Getting Access to A Certain Element In the Vector
How can I use mod(%) operator to get access to a certain element in a vector in c++? The following line is already recognized erroneous by the compiler.
...
0
votes
2answers
22 views
C++ Static vector loses data after exiting function
I have a static function:
void TextManager::printDialogue(vector<Button*>* options, int optionsCount, vector<string> outputDisplayText)
{
active = true;
buttons = *options;
...
1
vote
1answer
25 views
Matlab: conditional partition of sorted vector into parts
Is there any smart way of diving sorted vector into two parts condtion on value?
A = [5 4 4 4 3 3 2 1];
I want two vectors, one that has all numbers greater than 3 and the other vector that ...
1
vote
2answers
47 views
Convert byte[] to Vector
I stored a Vector<'String> into a BLOB field in a sqlite DB.
The problem is when I want to get that Vector, it has to be with cur.getBlob (method from a Cursor cur) and it returns a byte[], the ...
0
votes
0answers
63 views
Application crashes on std::vector::insert
My application is crashing at the following line in an application that I am working on:
struct PointIndex
{
int PointNr;
};
struct PointIndex PI = { 0 };
std::vector<PointIndex> MyVec;
...
1
vote
3answers
35 views
Unresolved external symbol error while using vectors defined in a header file
I am new to C++. I had an unresolved external symbol error while using vectors and didn't know what was going wrong so I've replicated it here.
I am using MS Visual Studio 2011. The exact error is:
...
1
vote
4answers
51 views
Runtime Error when erasing elements from std::vector
I have a vector index which contains the indices of elements that I want to remove
from the vector words.
vector<int> Index;
vector<int> words;
I tried using this method, but my ...
2
votes
3answers
106 views
Unusual behavior with std::vector
I've written a rather complicated set of classes to deal with iterating over a stream (string, file or memory). These are NOT std streams nor are they related. Anyway, due to iterating over these ...
-1
votes
1answer
67 views
Initializing matrix with default values in C++ [closed]
Im trying to initialize a matrix in C++ with all values -1 but it doesn't seem to be working.
vector<vector<int > > matrix(n+2, vector<int> (n+2, -1));
Original code:
int opt(int ...
1
vote
5answers
91 views
Two dimensional vector of integer C++. What's wrong?
I have trouble with two dimensional vector. Example:
vector < vector<int> > data;
int i = 0;
int int_value;
while (i < 10 )
{
cin >> int_value;
data[i].push_back ...