Click here to Skip to main content
15,888,610 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Int64 minus.... Pin
Dave Doknjas8-Mar-09 13:56
Dave Doknjas8-Mar-09 13:56 
Question(C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
zkii4-Mar-09 3:08
zkii4-Mar-09 3:08 
AnswerRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
led mike4-Mar-09 4:41
led mike4-Mar-09 4:41 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
zkii4-Mar-09 16:54
zkii4-Mar-09 16:54 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
led mike5-Mar-09 4:28
led mike5-Mar-09 4:28 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
zkii5-Mar-09 16:02
zkii5-Mar-09 16:02 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
led mike6-Mar-09 4:47
led mike6-Mar-09 4:47 
QuestionStreamReader delimiters in C++/CLI Pin
J_E_D_I3-Mar-09 22:14
J_E_D_I3-Mar-09 22:14 
Hi, I am trying to make my application read fields from a string array (by reading from a .csv file), assign each single field to a new string and then cast it double. I am however having problems setting the delimiters in C+/CLI.

The code I previously wrote for C++ (reported at the end) was working file, but I can't find anywhere how to set similar delimiters using C++/CLI.

// Create string array
array<String^>^ Cell= gcnew array<String^>(100);

StreamReader^ sr = gcnew StreamReader( "INPUT.csv" );

// Read up to the end of the file
while(sr->Peek() >= 0) 
 {
 for(int i = 0; i<100; i++)
  {
  // Missing code! What I don't know..
  // Should I use     Cell= sr.ReadLine().Split(delimiter.ToCharArray());    ?
		 		
  String^ Value0AsString= Cell[i++];
  String^ Value1AsString= Cell[i++];
  String^ Value2AsString= Cell[i++];

  double Value0= double:: Parse( Value0AsString);
  double Value1= double:: Parse( Value1AsString);
  double Value2= double:: Parse( Value2AsString);
  }
 }


The delimiters I would like to use are the following (code in c++):

string Cell[100];
int i = 0;
ifstream INPUT ("INPUT.csv");
while (! INPUT.eof())
 {  
 if ((i + 1) % 3 == 0) getline(INPUT, Cell[i++]);	
 else getline(INPUT, Cell[i++], '\,');
 }
....rest of the code


Any advice is welcome! Wink | ;)
AnswerRe: StreamReader delimiters in C++/CLI Pin
ky_rerun5-Mar-09 6:50
ky_rerun5-Mar-09 6:50 
AnswerRe: StreamReader delimiters in C++/CLI Pin
dybs6-Mar-09 17:58
dybs6-Mar-09 17:58 
QuestionRe: StreamReader delimiters in C++/CLI Pin
J_E_D_I16-Mar-09 7:06
J_E_D_I16-Mar-09 7:06 
AnswerRe: StreamReader delimiters in C++/CLI Pin
dybs16-Mar-09 13:21
dybs16-Mar-09 13:21 
GeneralRe: StreamReader delimiters in C++/CLI Pin
J_E_D_I25-Mar-09 11:19
J_E_D_I25-Mar-09 11:19 
GeneralRe: StreamReader delimiters in C++/CLI Pin
dybs25-Mar-09 15:33
dybs25-Mar-09 15:33 
QuestionSqlDataAdapter + DataSet problem Pin
CNTX!3-Mar-09 10:28
CNTX!3-Mar-09 10:28 
AnswerRe: SqlDataAdapter + DataSet problem Pin
N a v a n e e t h3-Mar-09 15:01
N a v a n e e t h3-Mar-09 15:01 
GeneralRe: SqlDataAdapter + DataSet problem Pin
CNTX!3-Mar-09 15:13
CNTX!3-Mar-09 15:13 
Questionreader.Read() to string array Pin
Thilek2-Mar-09 8:19
Thilek2-Mar-09 8:19 
AnswerRe: reader.Read() to string array Pin
N a v a n e e t h2-Mar-09 15:28
N a v a n e e t h2-Mar-09 15:28 
GeneralRe: reader.Read() to string array Pin
Thilek2-Mar-09 17:47
Thilek2-Mar-09 17:47 
GeneralRe: reader.Read() to string array Pin
N a v a n e e t h3-Mar-09 1:22
N a v a n e e t h3-Mar-09 1:22 
GeneralRe: reader.Read() to string array Pin
Thilek8-Mar-09 6:58
Thilek8-Mar-09 6:58 
QuestionError Message Pin
vanishaa2-Mar-09 2:58
vanishaa2-Mar-09 2:58 
GeneralRe: Error Message Pin
Luc Pattyn2-Mar-09 3:50
sitebuilderLuc Pattyn2-Mar-09 3:50 
GeneralRe: Error Message Pin
N a v a n e e t h2-Mar-09 15:15
N a v a n e e t h2-Mar-09 15:15 

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.