Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Standard Object and Function names helper Pin
Aescleal16-Sep-10 0:07
Aescleal16-Sep-10 0:07 
GeneralRe: Standard Object and Function names helper Pin
Chesnokov Yuriy16-Sep-10 0:20
professionalChesnokov Yuriy16-Sep-10 0:20 
GeneralRe: Standard Object and Function names helper Pin
Aescleal16-Sep-10 1:35
Aescleal16-Sep-10 1:35 
GeneralOT Pin
Richard MacCutchan18-Sep-10 3:10
mveRichard MacCutchan18-Sep-10 3:10 
AnswerRe: Standard Object and Function names helper Pin
Moak16-Sep-10 0:21
Moak16-Sep-10 0:21 
GeneralRe: Standard Object and Function names helper Pin
Chesnokov Yuriy16-Sep-10 1:09
professionalChesnokov Yuriy16-Sep-10 1:09 
GeneralRe: Standard Object and Function names helper Pin
Moak16-Sep-10 1:20
Moak16-Sep-10 1:20 
QuestionVector Error Pin
Nikesh Jagtap15-Sep-10 21:47
Nikesh Jagtap15-Sep-10 21:47 
I have wrote one program which deletes the elements from first vector 'v1' which are not in another vector 'v3'. At the deleting time i also want to delete that same index element from vector v2.
Eg. The 3 value of 'v3' is not present in 'v1', so i want to delete value 3 from 'v1' and value 7 of index 2 (if we consider 0 based index) from 'v2'.
But it goes crash at some point.
When you see program you get clear with this thing.
I am using Microsoft Visual Studio 6.0 editor. The code snippet is as

#include "stdafx.h"
#include <vector>
#include <algorithm>

#include <iostream>

int main( )
{
using namespace std;
vector <int> v1,v2,v3;
vector <int>::iterator result;

v1.push_back( 1 );
v1.push_back( 2 );
v1.push_back( 3 );
v1.push_back( 4 );

v2.push_back( 7 );
v2.push_back( 7 );
v2.push_back( 7 );
v2.push_back( 7 );

v3.push_back( 1 );
v3.push_back( 2 );

vector <int>::iterator V1Startitr = v1.begin();
vector <int>::iterator V1Enditr = v1.end();

vector <int>::iterator V2Startitr = v2.begin();
vector <int>::iterator V2Enditr = v2.end();

for(V1Startitr,
V2Startitr;
V1Startitr != V1Enditr;
V1Startitr++,V2Startitr++)
{
result = find(v3.begin(),v3.end(),*V1Startitr);

if(result == v3.end())
{
cout<
AnswerRe: Vector Error PinPopular
Cedric Moonen15-Sep-10 22:04
Cedric Moonen15-Sep-10 22:04 
QuestionError during compilation Pin
arupsarkar15-Sep-10 16:48
arupsarkar15-Sep-10 16:48 
AnswerRe: Error during compilation Pin
Luc Pattyn15-Sep-10 17:16
sitebuilderLuc Pattyn15-Sep-10 17:16 
GeneralRe: Error during compilation Pin
arupsarkar15-Sep-10 18:30
arupsarkar15-Sep-10 18:30 
GeneralRe: Error during compilation Pin
Luc Pattyn16-Sep-10 0:55
sitebuilderLuc Pattyn16-Sep-10 0:55 
GeneralRe: Error during compilation Pin
David Crow16-Sep-10 2:55
David Crow16-Sep-10 2:55 
QuestionChanging the mouse pointer globally Pin
pjdriverdude15-Sep-10 9:56
pjdriverdude15-Sep-10 9:56 
GeneralRe: Changing the mouse pointer globally Pin
David Crow15-Sep-10 10:00
David Crow15-Sep-10 10:00 
GeneralRe: Changing the mouse pointer globally Pin
pjdriverdude15-Sep-10 10:40
pjdriverdude15-Sep-10 10:40 
AnswerRe: Changing the mouse pointer globally Pin
pjdriverdude16-Sep-10 5:08
pjdriverdude16-Sep-10 5:08 
Questionfatal error c1020: unexpected #endif [modified] Pin
AmbiguousName15-Sep-10 6:52
AmbiguousName15-Sep-10 6:52 
QuestionRe: fatal error c1020: unexpected #endif Pin
David Crow15-Sep-10 7:11
David Crow15-Sep-10 7:11 
AnswerRe: fatal error c1020: unexpected #endif Pin
Luc Pattyn15-Sep-10 7:18
sitebuilderLuc Pattyn15-Sep-10 7:18 
GeneralRe: fatal error c1020: unexpected #endif Pin
AmbiguousName15-Sep-10 19:13
AmbiguousName15-Sep-10 19:13 
GeneralRe: fatal error c1020: unexpected #endif Pin
Luc Pattyn16-Sep-10 0:57
sitebuilderLuc Pattyn16-Sep-10 0:57 
GeneralRe: fatal error c1020: unexpected #endif Pin
David Crow16-Sep-10 2:51
David Crow16-Sep-10 2:51 
AnswerRe: fatal error c1020: unexpected #endif Pin
Richard MacCutchan15-Sep-10 8:37
mveRichard MacCutchan15-Sep-10 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.