Click here to Skip to main content
15,867,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error LNK2019 Pin
wira1guys4-Dec-07 19:49
wira1guys4-Dec-07 19:49 
QuestionHow to Use libpng? Pin
manish.patel3-Dec-07 17:37
manish.patel3-Dec-07 17:37 
AnswerRe: How to Use libpng? Pin
Hamid_RT3-Dec-07 19:37
Hamid_RT3-Dec-07 19:37 
GeneralMoveWindow() Pin
Oliver1233-Dec-07 16:25
Oliver1233-Dec-07 16:25 
GeneralRe: MoveWindow() Pin
bob169723-Dec-07 17:13
bob169723-Dec-07 17:13 
GeneralRe: MoveWindow() Pin
Hamid_RT3-Dec-07 19:36
Hamid_RT3-Dec-07 19:36 
GeneralRe: MoveWindow() Pin
David Crow4-Dec-07 7:29
David Crow4-Dec-07 7:29 
GeneralIn a vector: How to locate a certain element; then erase just that element Pin
Larry Mills Sr3-Dec-07 10:49
Larry Mills Sr3-Dec-07 10:49 
========================== headers ======================
// MyTrailer.h

#if !defined(AFX_MYTRAILER_H)
#define AFX_MYTRAILER_H

#include <string>

class CMyTrailer {
public:
// Varables
CString m_csItem;
CString m_csMFG;
CString m_csID;

CMyTrailer();
~CMyTrailer();

};

#endif
// Trailer.h

#if !defined(_TRAILER_H)
#define _TRAILER_H

#include <vector>
#include "MyTrailer.h"


class CMyTrailer;

using std::vector;
using std::copy;
using std::iterator;
using std::string;

class CTrailer {

public:
CTrailer(int nIsPage=0);
~CTrailer();

// Varables:
CMyTrailer m_MyTrailer;
// Vectors:
// Setup vectors:
std::vector<CMyTrailer> m_vTlr; // Item
// Iterators:
std::vector<CMyTrailer>::iterator m_ITTrlr;
//Functions:

};

#endif

=================== end headers ==========================
CTrailer m_Trlr2(2); // create instance

================= 7th element in vector ===================
m_Trlr2.m_MyTrailer.m_csItem = "Tire";
m_Trlr2.m_MyTrailer.m_csMFG = "Goodyear";
m_Trlr2.m_MyTrailer.m_csID = "1110109";
===========================================================

How would I find the 7th element(could be anywhere but I'm using the example that it is the 7th element) in the vector when searching by
m_Trlr2.m_MyTrailer.m_csID ?
How woulod I erase only the 7th element? and would there be a blank spot in the vector after the 7th element is erased?
A C++ programming language novice, but striving to learn
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
Stephen Hewitt3-Dec-07 13:42
Stephen Hewitt3-Dec-07 13:42 
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
Stephen Hewitt3-Dec-07 13:50
Stephen Hewitt3-Dec-07 13:50 
GeneralRe: In a vector: How to locate a certain element; then erase just that element [modified] Pin
Larry Mills Sr4-Dec-07 5:45
Larry Mills Sr4-Dec-07 5:45 
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
David Crow4-Dec-07 7:33
David Crow4-Dec-07 7:33 
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
Larry Mills Sr4-Dec-07 11:37
Larry Mills Sr4-Dec-07 11:37 
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
Nelek4-Dec-07 21:28
protectorNelek4-Dec-07 21:28 
GeneralRe: In a vector: How to locate a certain element; then erase just that element Pin
Larry Mills Sr5-Dec-07 3:24
Larry Mills Sr5-Dec-07 3:24 
GeneralDialog box with changeable STATIC text and TITLE Pin
RomTibi3-Dec-07 9:12
RomTibi3-Dec-07 9:12 
GeneralRe: Dialog box with changeable STATIC text and TITLE Pin
Oliver1233-Dec-07 18:18
Oliver1233-Dec-07 18:18 
GeneralRe: Dialog box with changeable STATIC text and TITLE Pin
RomTibi4-Dec-07 8:56
RomTibi4-Dec-07 8:56 
GeneralRe: Dialog box with changeable STATIC text and TITLE Pin
Paresh Chitte3-Dec-07 18:26
Paresh Chitte3-Dec-07 18:26 
GeneralRe: Dialog box with changeable STATIC text and TITLE Pin
RomTibi4-Dec-07 8:57
RomTibi4-Dec-07 8:57 
GeneralDialog box with changeable STATIC text Pin
RomTibi3-Dec-07 9:09
RomTibi3-Dec-07 9:09 
QuestionRe: Dialog box with changeable STATIC text Pin
Mark Salsbery3-Dec-07 10:08
Mark Salsbery3-Dec-07 10:08 
GeneralRe: Dialog box with changeable STATIC text Pin
RomTibi4-Dec-07 8:57
RomTibi4-Dec-07 8:57 
GeneralRe: Dialog box with changeable STATIC text Pin
Hamid_RT3-Dec-07 19:31
Hamid_RT3-Dec-07 19:31 
GeneralRe: Dialog box with changeable STATIC text Pin
RomTibi4-Dec-07 8:58
RomTibi4-Dec-07 8:58 

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.