Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting a function Pointer Pin
San Saeteurn21-Jul-09 5:28
San Saeteurn21-Jul-09 5:28 
QuestionLRESULT question about beginner tutorial Pin
Adassus20-Jul-09 8:39
Adassus20-Jul-09 8:39 
AnswerRe: LRESULT question about beginner tutorial Pin
Maximilien20-Jul-09 9:13
Maximilien20-Jul-09 9:13 
AnswerRe: LRESULT question about beginner tutorial Pin
Stuart Dootson20-Jul-09 12:25
professionalStuart Dootson20-Jul-09 12:25 
Questionwant to access any windows input elements from a win32 or mfc program Pin
Jayapal Chandran20-Jul-09 7:32
Jayapal Chandran20-Jul-09 7:32 
AnswerRe: want to access any windows input elements from a win32 or mfc program Pin
Hari Mahadevan20-Jul-09 15:27
professionalHari Mahadevan20-Jul-09 15:27 
GeneralRe: want to access any windows input elements from a win32 or mfc program Pin
Jayapal Chandran23-Jul-09 8:41
Jayapal Chandran23-Jul-09 8:41 
QuestionList focus setting problem Pin
bhanu_reddy0920-Jul-09 6:08
bhanu_reddy0920-Jul-09 6:08 
QuestionRe: List focus setting problem Pin
David Crow20-Jul-09 6:50
David Crow20-Jul-09 6:50 
Generalplease suggest me some good pregram using datastructure. Pin
pavarathyRock20-Jul-09 5:46
pavarathyRock20-Jul-09 5:46 
GeneralRe: please suggest me some good pregram using datastructure. Pin
David Crow20-Jul-09 6:54
David Crow20-Jul-09 6:54 
GeneralRe: please suggest me some good pregram using datastructure. Pin
pavarathyRock20-Jul-09 17:36
pavarathyRock20-Jul-09 17:36 
GeneralRe: please suggest me some good pregram using datastructure. Pin
Rozis20-Jul-09 10:45
Rozis20-Jul-09 10:45 
GeneralRe: please suggest me some good pregram using datastructure. Pin
pavarathyRock20-Jul-09 17:39
pavarathyRock20-Jul-09 17:39 
QuestionEXIT_FAILURE, EXIT_SUCCESS Pin
Sauce!20-Jul-09 4:58
Sauce!20-Jul-09 4:58 
AnswerRe: EXIT_FAILURE, EXIT_SUCCESS Pin
Sarath C20-Jul-09 8:27
Sarath C20-Jul-09 8:27 
AnswerRe: EXIT_FAILURE, EXIT_SUCCESS Pin
Stuart Dootson20-Jul-09 12:37
professionalStuart Dootson20-Jul-09 12:37 
GeneralRe: EXIT_FAILURE, EXIT_SUCCESS Pin
Sauce!21-Jul-09 1:24
Sauce!21-Jul-09 1:24 
QuestionCapture Events Written to Application Log Pin
Raghu.Amil20-Jul-09 4:47
Raghu.Amil20-Jul-09 4:47 
Questionfont for TabCtrl Pin
kumar sanghvi20-Jul-09 3:59
kumar sanghvi20-Jul-09 3:59 
QuestionReading .csv files Pin
prithaa20-Jul-09 3:15
prithaa20-Jul-09 3:15 
QuestionRe: Reading .csv files Pin
David Crow20-Jul-09 3:25
David Crow20-Jul-09 3:25 
AnswerRe: Reading .csv files Pin
Sarath C20-Jul-09 3:46
Sarath C20-Jul-09 3:46 
why it's necessary to create iterator for a file buffer? you don't need to deal with internal buffer of a file. You can simply use other stream, string classes to get your task done. Just see a sample code below. it's plain and clear no? (Sorry it's not written myself. taken from some forums)
#include <iostream>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>

using namespace std;

int main ()
{
    ifstream inFile ("csv.dat");
    string line;
    int linenum = 0;
    while (getline (inFile, line))
    {
        linenum++;
        cout << "\nLine #" << linenum << ":" << endl;
        istringstream linestream(line);
        string item;
        int itemnum = 0;
        while (getline (linestream, item, ','))
        {
            itemnum++;
            cout << "Item #" << itemnum << ": " << item << endl;
        }
    }

    return 0;
}


-Sarath.

Rate the answers and close your posts if it's answered

GeneralRe: Reading .csv files Pin
prithaa20-Jul-09 4:19
prithaa20-Jul-09 4:19 
QuestionUsing COM Dll Without Registering It Pin
Ash_VCPP20-Jul-09 3:05
Ash_VCPP20-Jul-09 3:05 

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.