Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Potentially silly question about CWinThread Pin
nay14-Dec-01 12:09
nay14-Dec-01 12:09 
QuestionWhat am I missing here? Pin
clintsinger14-Dec-01 7:25
clintsinger14-Dec-01 7:25 
AnswerRe: What am I missing here? Pin
Joaquín M López Muñoz14-Dec-01 10:33
Joaquín M López Muñoz14-Dec-01 10:33 
Generalaccessing an ADO recordset pointer from another window Pin
14-Dec-01 7:13
suss14-Dec-01 7:13 
GeneralRe: accessing an ADO recordset pointer from another window Pin
Carlos Antollini14-Dec-01 7:28
Carlos Antollini14-Dec-01 7:28 
QuestionHow to find out unwanted DLL in a System? Pin
14-Dec-01 6:38
suss14-Dec-01 6:38 
AnswerRe: How to find out unwanted DLL in a System? Pin
Alvaro Mendez14-Dec-01 7:16
Alvaro Mendez14-Dec-01 7:16 
GeneralTrying to manipulate CStdioFile Pin
Stevieslu14-Dec-01 6:37
Stevieslu14-Dec-01 6:37 
I am trying to replace spaces with newlines \n's in a file to create a single column then I can read the file using ReadString to get one value at a time but it doesn't work. It still thinks the file has the original set-up of rows and columns instead of just a single column. Can anyone explain why?

Here is the code...

CString cFilename = lpszPathName;
CStdioFile fDataFile,fDataCol;
CString szValue;
CString szRow;

fDataFile.Open(lpszPathName, CFile::modeRead);

fDataFile.ReadString(szRow);
int nFirst = szRow.Replace(" ","\n");

while(fDataFile.ReadString(szRow))
{
int nCol = szRow.Replace(" ","\n"); }

fDataFile.Close();

fDataCol.Open(lpszPathName, CFile::modeRead);

BOOL b = fDataCol.ReadString(szValue);

if(TRUE == b)
{
m_nRows = atoi(szValue);
}

b = fDataCol.ReadString(szValue);

if(TRUE == b)
{
m_nColumns = atoi(szValue);
}

m_nValues = (m_nRows*m_nColumns);

m_GraphData.SetSize(m_nRows);

int nRowCount;
int nColumnCount;

for (nRowCount = 0; nRowCount
GeneralRe: Trying to manipulate CStdioFile Pin
Alvaro Mendez14-Dec-01 7:19
Alvaro Mendez14-Dec-01 7:19 
Generalimplementing powerpoint presentation slide show Pin
Kuniva14-Dec-01 5:37
Kuniva14-Dec-01 5:37 
GeneralEmail Pin
SuperGeek14-Dec-01 5:31
SuperGeek14-Dec-01 5:31 
GeneralRe: Email Pin
Andrew Peace15-Dec-01 4:14
Andrew Peace15-Dec-01 4:14 
Generalswitching Media player active-x control to full screen Pin
Kuniva14-Dec-01 5:13
Kuniva14-Dec-01 5:13 
GeneralConverting int to CString Pin
Cam14-Dec-01 4:53
Cam14-Dec-01 4:53 
GeneralRe: Converting int to CString Pin
Joaquín M López Muñoz14-Dec-01 4:59
Joaquín M López Muñoz14-Dec-01 4:59 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:09
Cam14-Dec-01 5:09 
GeneralRe: Converting int to CString Pin
Alvaro Mendez14-Dec-01 5:16
Alvaro Mendez14-Dec-01 5:16 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:48
Cam14-Dec-01 5:48 
QuestionHow to Change the 'Caption' of a CPropertyPage Pin
14-Dec-01 3:39
suss14-Dec-01 3:39 
AnswerRe: How to Change the 'Caption' of a CPropertyPage Pin
Joaquín M López Muñoz14-Dec-01 4:23
Joaquín M López Muñoz14-Dec-01 4:23 
GeneralCreating Excel files Pin
14-Dec-01 2:21
suss14-Dec-01 2:21 
QuestionHow do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 2:04
Jon Hulatt14-Dec-01 2:04 
AnswerRe: How do I create a "Virtual" Device Context? Pin
Joaquín M López Muñoz14-Dec-01 2:11
Joaquín M López Muñoz14-Dec-01 2:11 
GeneralRe: How do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 3:18
Jon Hulatt14-Dec-01 3:18 
GeneralRe: How do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 3:31
Jon Hulatt14-Dec-01 3:31 

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.