No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, Am trying to create a multipage (or multitab) user form and each one of page (tab) has several textboxes in it. After user enters the input in the textboxes, the data goes into an xml file. All I wannna know is, what is the syntax for getting inputs from … |
|
My professor has given me the code and I wanna run it. I use Visual Studio2008. Code contains data structure "queue". He defines one queue as "queue<int> Q;" But my compiler gives an error and says "error C2065: 'queue' : undeclared identifier" Do we need any separate header file to … |
|
Does anyone know how to truly select random element from a vector v? I tried this: int rnd; rnd = v[ (int)floor( (double)rand()*( (double)v.size() / (double)RAND_MAX ) ) ]; cout<< "Random element: "<<rnd; But every time it's selecting only one particular element from my vector. It should be random right. … |
|
If I have a vector v={1,2,4,6,8} and I find my maximum element of this vector using this: " vector<int>::iterator iter_max = max_element(v.begin(), v.end()); cout<<"Largest element is "<< *iter_max; " which works fine. But I need to know the position of this max element. Is it second, third or fourth in … |
|
what do u mean by this code below? 1)vector<int> V(alpha); 2)vector<int> V(vector<int>) Whats tat declaring? Its not normal vector declaration. Plz help. Thnx |