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

C / C++ / MFC

 
AnswerRe: Assertion Failed Pin
crieagu26-Mar-07 3:09
crieagu26-Mar-07 3:09 
GeneralRe: Assertion Failed Pin
David Crow26-Mar-07 3:20
David Crow26-Mar-07 3:20 
GeneralRe: Assertion Failed Pin
crieagu26-Mar-07 3:37
crieagu26-Mar-07 3:37 
GeneralRe: Assertion Failed Pin
David Crow26-Mar-07 3:39
David Crow26-Mar-07 3:39 
QuestionReading csv file -> Lil modification needed..... Pin
Software_Specialist24-Mar-07 15:13
Software_Specialist24-Mar-07 15:13 
AnswerRe: Reading csv file -> Lil modification needed..... Pin
Software_Specialist25-Mar-07 3:30
Software_Specialist25-Mar-07 3:30 
GeneralRe: Reading csv file -> Lil modification needed..... Pin
PJ Arends25-Mar-07 13:20
professionalPJ Arends25-Mar-07 13:20 
GeneralRe: Reading csv file -> Lil modification needed..... Pin
Stephen Hewitt25-Mar-07 14:32
Stephen Hewitt25-Mar-07 14:32 
PJ Arends wrote:
you could use ifstream::getline although the shortfall of getline is that it requires a preallocated buffer.

This isn't the case as I underdstand it. For example, consider the following code:
// CommandLine.cpp : Defines the entry point for the console application.
//
 
#include "StdAfx.h"
#include <iostream>
#include <string>
 
int main()
{
	using namespace std;
 
	string line;
	if (getline(cin, line))
	{
		cout << "Line read was \"" << line << "\"" << endl;
	}
 
	return 0;
}

This code works (even on MSVC6!) but there is no preallocated buffer. Granted I'm not calling ifstream::getline but that's not where the method we need lives!


Steve

GeneralRe: Reading csv file -> Lil modification needed..... Pin
PJ Arends25-Mar-07 17:00
professionalPJ Arends25-Mar-07 17:00 
AnswerRe: Reading csv file -> Lil modification needed..... Pin
Stephen Hewitt25-Mar-07 14:35
Stephen Hewitt25-Mar-07 14:35 
GeneralRe: Reading csv file -> Lil modification needed..... Pin
Software_Specialist26-Mar-07 10:21
Software_Specialist26-Mar-07 10:21 
GeneralRe: Reading csv file -&amp;gt; Lil modification needed..... Pin
Stephen Hewitt26-Mar-07 13:22
Stephen Hewitt26-Mar-07 13:22 
GeneralRe: Reading csv file -&amp;gt; Lil modification needed..... Pin
Software_Specialist26-Mar-07 14:22
Software_Specialist26-Mar-07 14:22 
GeneralRe: Reading csv file -&amp;gt; Lil modification needed..... Pin
Stephen Hewitt26-Mar-07 14:32
Stephen Hewitt26-Mar-07 14:32 
GeneralRe: Reading csv file -&amp;gt; Lil modification needed..... Pin
Software_Specialist27-Mar-07 2:34
Software_Specialist27-Mar-07 2:34 
GeneralRe: Reading csv file -&amp;amp;gt; Lil modification needed..... Pin
Stephen Hewitt27-Mar-07 4:01
Stephen Hewitt27-Mar-07 4:01 
QuestionPPC (tmpstr) Index Numbering Pin
ZapMe124-Mar-07 11:30
ZapMe124-Mar-07 11:30 
QuestionActive interfaces [modified] Pin
deeps_cute24-Mar-07 9:38
deeps_cute24-Mar-07 9:38 
QuestionRe: Active interfaces Pin
Mark Salsbery25-Mar-07 9:02
Mark Salsbery25-Mar-07 9:02 
Questionhow many lines? Pin
Lord_Vader24-Mar-07 9:19
Lord_Vader24-Mar-07 9:19 
AnswerRe: how many lines? Pin
Christian Graus24-Mar-07 10:02
protectorChristian Graus24-Mar-07 10:02 
GeneralRe: how many lines? Pin
Lord_Vader24-Mar-07 10:06
Lord_Vader24-Mar-07 10:06 
GeneralRe: how many lines? Pin
Christian Graus24-Mar-07 12:39
protectorChristian Graus24-Mar-07 12:39 
GeneralRe: how many lines? Pin
Lord_Vader24-Mar-07 13:33
Lord_Vader24-Mar-07 13:33 
GeneralRe: how many lines? Pin
Christian Graus24-Mar-07 14:23
protectorChristian Graus24-Mar-07 14:23 

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.