Hi guys,
I am trying to write a module transfering from MATLAB. In order to avoid unnecessary errors, I do some input arguments checkings before processing. The user is allowed to put in only 3 arguments, that's why the last argument is a list instead of a fixed variable. Nevertheless, user has only 2 possibilities either he gives 3 or 4 inputs.
The point is I'd like to check if there is any vector in the list (last...
Search Result
Collapse
8 results in 0.0043 seconds.
Keywords
Members
Tags
-
How to search for vector in list of input arguments
-
Incorrect vector subscript out of range
Hi all,
I'm working in visual studio 2010. I'm getting a "vector subscript out of range debug assertion check" -error, which I believe is incorrect.
I have created a minimal example:
Code:int xsize = 4dVector.size(); int ysize = 4dVector[x].size(); int zsize = 4dVector[x][y].size(); int nbelements = 4dVector[x][y][z].size(); for (uint32_t i = 0; i < 4dVector[x][y][z].size();
-
Liam Kurmos started a topic Why do i have to assign this iterator pointer to a variable before i can use it?in CWhy do i have to assign this iterator pointer to a variable before i can use it?
im using g++ on ubuntu 10.10
i have a pointer to a vector of pointers to objects and i want to call a method on each of those objects.
oc->features is defined as:
vector<Feature* >* features;
i have to do:
Code:vector<Feature*>::iterator it; for (it=oc->features->begin();it!=oc->features->end();it++){ Feature* a=*(it);
Last edited by Niheel; Feb 9 '11, 05:08 PM. -
Python help making vectors!
Hello all,
To begin, I am working with a MySQL database using python. In the database, I am working with 3 columns: REF_ENTRY_TIME, REF_EXIT_TIME, REF_ENTRY_VALUE . My goal is to graph the net value position against time. For the time portion, both REF_ENTRY_TIME and REF_EXIT_TIME are random various times between 9:00 and 12:00. REF_ENTRY_VALUE is just a number around 100. In total I have a bout 50 columns.
The... -
C/C++ Matrix/Vector Calculation
Hey, I have a program which is done but it gives me the wrong output. It would be greatly appreciated if somebody could help me get the correct output. The question asks:
Develop a program which computes the current value of the vector {x} based on the following forward iteration: {x}(n+1) = [K] {x}(n)+ {z}, n = 0,1,2,3,4.
In other words, the next vector {x} is equal to the product of [K] and the current vector {x} + constant... -
Vector Iterators, Erase Loops and Frustration
Hi All,
I've been flummoxed by this bizarre behaviour and would like insight on how to get around it.
--Snip--
[code=c]
struct polygon
{
int i; int j;
}
void doStuff(vector< polygon>* myPolygons){
vector<polygon> tempPoly;
tempPoly.swap(* myPolygons)
vector<polygon> ::iterator itrV;
for(itrV=tempPo ly.begin(); itrV!=tempPoly. end();itrV++){... -
error C2679
Hi, I'm working on a project to create a robotics simulation environment based on c++ and opengl. Right now I'm stuck trying to solve a compilation error that I'm getting while trying to push_back an object from one of my classes.
Here's part of the code:
Code:class RobotStruct { public: RobotStruct(); virtual ~RobotStruct(); void AddJoint(float Theta, float Alpha, float a, float d, int Type);
-
vector question
hello.. just started learning cpp so my question might be bit stupid.. sorry 4 that.
Code:class Parser{ public: static vector<device*> parseConfiguration(ifstream& configFile) { string line; vector<device*> myDevices; .. ... ... if (device.compare("server") == 0) { int bufferSize; Id = helpFunctions::stoi(lineInVector[1]);