Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to notify SMB copy file finish? Pin
TooBaya11-Sep-08 16:57
TooBaya11-Sep-08 16:57 
AnswerRe: How to notify SMB copy file finish? Pin
Rane12-Sep-08 6:10
Rane12-Sep-08 6:10 
GeneralRe: How to notify SMB copy file finish? Pin
James R. Twine12-Sep-08 8:10
James R. Twine12-Sep-08 8:10 
GeneralRe: How to notify SMB copy file finish? Pin
TooBaya13-Sep-08 5:15
TooBaya13-Sep-08 5:15 
QuestionVector is losing varable data Pin
Larry Mills Sr11-Sep-08 16:31
Larry Mills Sr11-Sep-08 16:31 
QuestionRe: Vector is losing varable data Pin
David Crow11-Sep-08 17:07
David Crow11-Sep-08 17:07 
QuestionRe: Vector is losing varable data Pin
CPallini11-Sep-08 21:23
mveCPallini11-Sep-08 21:23 
AnswerRe: Vector is losing varable data Pin
Larry Mills Sr12-Sep-08 8:05
Larry Mills Sr12-Sep-08 8:05 
Here's the heaer for for the class I'm inserting into the vector:

// WellSysData.h : header file
// Class's Used by: CWellSysDlg,

#pragma once



// CWellSysData
// Class that contains the WellSystem File Data

class CWellSysData
{


public:
// Functions:
CWellSysData(); // Default Constructor
~CWellSysData(); // Default Destructor
void CleanUp(void);

// Copy Constructor:
CWellSysData(const CWellSysData& cSource);

// Assignment operator:
CWellSysData& operator= (const CWellSysData& cSource);
CString SetPathName(CString str);

//Varables:
CString m_csOperator;
CString m_csWellName;
CString m_csTankMFG;
CString m_csTankID;
CString m_csDaysPrsent;
CString m_csTankPath;//Path to Tank: \\m_csTankMFG + \\m_csTankID
CString m_csWellPath;//Path to well: \\Operators\\m_csOperator\\m_csWellName
CString m_csExtra1; // WellPath to Well's Data File
CString m_csExtra2;

};

here's the declaration for the vector:


// WellSysDataVec.h


#pragma once

#include "WellSysData.h"
#include <string>

#include <vector>
#include <algorithm>


class CWellSysData;

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

class CWellSysDataVec {

public:
CWellSysDataVec(void);
~CWellSysDataVec();

// Varables:
CWellSysData m_cWellSysData;

// Setup vectors:
std::vector<CWellSysData> m_vWellSysData; // vector
std::vector<CString> m_vFileStr; // vector

// Iterators:
std::vector<CWellSysData>::iterator m_ITWellSysData;
std::vector<CString>::iterator m_ITFileStr;
//Functions:

};

Here's the call:

CString str, str2, str3, str4;
CEdit* pEdit1 = (CEdit*) GetDlgItem(IDC_WELLNAME);
str = "";
str3 = "";
str4 = "";
str4 = m_csOperator;
pEdit1-&gt;GetWindowText(str);
m_cSysData.m_csWellName = str;
str2 = str;
str3 = str;
str = "";
str2 = SetWellPath(str4,str3);
m_cSysData.m_csWellPath = str2;
str2 = "";
str2 = SetWellFileNamePath(str4,str3);
m_cSysData.m_csExtra1 = str2;// has value in it at this point
str = m_cSysData.m_csWellPath;
m_vSys.m_vWellSysData.push_back(m_cSysData);// m_vWellSysData[0].m_csExtra1 does NOT have the value in it.(ALL OTHER DATA IS THERE. m_cSysData.m_csExtra1 HAS ALL THE DATA IN IT AT THIS POINT AND AFTERWARDS.



CString CCreateWellsDlg::RetWellFileNameSys(CString str4, CString str3)
{
CString str,str1,str2;
str2 = "\\";
str1 = "c:\\Frac Tanks\\Program\\DataBases\\OperatorDB\\Operators\\";
str = str1;
str += str4;
str += str2;
str += str3;
return str;
}


CString CCreateWellsDlg::SetWellFileNamePath(CString str4, CString str3)
{
CString str, str1, str2;
str1 = "c:\\Frac Tanks\\Program\\DataBases\\OperatorDB\\Operators\\";//Operator.sdb");
// Make path for SystemDB.sdb file for each Operator:
str = str1;
str += str4;
str += "\\";
str += str3;
str += "\\";
str += "WellDataDB.sdb";// each Well has this for FracTank Listing
return str;
}


CString CCreateWellsDlg::SetWellPath(CString str4, CString str3)
{
CString str, str1, str2;
str1 = "c:\\Frac Tanks\\Program\\DataBases\\OperatorDB\\Operators\\";//Operator.sdb");
// Make path for SystemDB.sdb file for each Operator:
str = str1;
str += str4;
str += "\\";
str += str3;
return str;
}

A C++ programming language novice, but striving to learn
GeneralRe: Vector is losing varable data Pin
CPallini12-Sep-08 8:29
mveCPallini12-Sep-08 8:29 
GeneralRe: Vector is losing varable data Pin
Larry Mills Sr15-Sep-08 2:52
Larry Mills Sr15-Sep-08 2:52 
Questiondual interface Pin
George_George11-Sep-08 16:25
George_George11-Sep-08 16:25 
AnswerRe: dual interface Pin
Steve Echols11-Sep-08 19:59
Steve Echols11-Sep-08 19:59 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:21
George_George11-Sep-08 20:21 
GeneralRe: dual interface Pin
SandipG 11-Sep-08 20:28
SandipG 11-Sep-08 20:28 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:34
George_George11-Sep-08 20:34 
GeneralRe: dual interface Pin
SandipG 11-Sep-08 20:38
SandipG 11-Sep-08 20:38 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:50
George_George11-Sep-08 20:50 
GeneralRe: dual interface Pin
CPallini11-Sep-08 21:54
mveCPallini11-Sep-08 21:54 
GeneralRe: dual interface Pin
George_George11-Sep-08 21:58
George_George11-Sep-08 21:58 
GeneralRe: dual interface Pin
CPallini11-Sep-08 22:11
mveCPallini11-Sep-08 22:11 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:02
George_George11-Sep-08 23:02 
GeneralRe: dual interface Pin
Swathee11-Sep-08 22:44
Swathee11-Sep-08 22:44 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:09
George_George11-Sep-08 23:09 
GeneralRe: dual interface [modified] Pin
SandipG 11-Sep-08 22:13
SandipG 11-Sep-08 22:13 
GeneralRe: dual interface Pin
CPallini11-Sep-08 22:33
mveCPallini11-Sep-08 22:33 

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.