Click here to Skip to main content
16,005,181 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Want an MFC application to start just aftr booting Pin
Shraddhan22-Jan-06 18:11
Shraddhan22-Jan-06 18:11 
Questionread ascii matrix from file Pin
Russell'19-Jan-06 2:25
Russell'19-Jan-06 2:25 
AnswerRe: read ascii matrix from file Pin
Maximilien19-Jan-06 2:49
Maximilien19-Jan-06 2:49 
GeneralRe: read ascii matrix from file Pin
Russell'19-Jan-06 3:07
Russell'19-Jan-06 3:07 
AnswerRe: read ascii matrix from file Pin
David Crow19-Jan-06 2:53
David Crow19-Jan-06 2:53 
GeneralRe: read ascii matrix from file Pin
Russell'19-Jan-06 3:02
Russell'19-Jan-06 3:02 
GeneralRe: read ascii matrix from file Pin
David Crow19-Jan-06 3:30
David Crow19-Jan-06 3:30 
AnswerRe: read ascii matrix from file Pin
Stephen Hewitt19-Jan-06 3:07
Stephen Hewitt19-Jan-06 3:07 
Here's one way to do it with STL (I know you asked for MFC, sorry). It doesn't actually store anything but it shows the basic structure.

#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;

int main(int argc, char* argv[])
{
ifstream fs("C:\\a.txt");

string line;
while ( getline(fs, line) )
{
stringstream ss(line);

string word;
while ( ss >> word )
{
cout << word << " ***END OF WORD*** ";
}

cout << "***END OF LINE***" << endl;
}

return 0;
}

Nice and clean and it works on any system with a standard compliant C++ compiler.

Steve

JokeRe: read ascii matrix from file Pin
Russell'19-Jan-06 4:22
Russell'19-Jan-06 4:22 
QuestionTCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:10
kelprinc19-Jan-06 1:10 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:18
Owner drawn19-Jan-06 1:18 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:25
kelprinc19-Jan-06 1:25 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:30
Owner drawn19-Jan-06 1:30 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:38
kelprinc19-Jan-06 1:38 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:43
Owner drawn19-Jan-06 1:43 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:46
kelprinc19-Jan-06 1:46 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 1:50
Owner drawn19-Jan-06 1:50 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 1:55
kelprinc19-Jan-06 1:55 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 2:01
Owner drawn19-Jan-06 2:01 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:11
kelprinc19-Jan-06 2:11 
AnswerRe: TCHAR* and LPTSTR Pin
Owner drawn19-Jan-06 2:18
Owner drawn19-Jan-06 2:18 
QuestionRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:27
kelprinc19-Jan-06 2:27 
AnswerRe: TCHAR* and LPTSTR Pin
Prakash Nadar19-Jan-06 5:00
Prakash Nadar19-Jan-06 5:00 
AnswerRe: TCHAR* and LPTSTR Pin
kakan19-Jan-06 2:21
professionalkakan19-Jan-06 2:21 
GeneralRe: TCHAR* and LPTSTR Pin
kelprinc19-Jan-06 2:24
kelprinc19-Jan-06 2:24 

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.