Click here to Skip to main content
15,900,907 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with polymorphism Pin
David Crow3-Mar-05 2:35
David Crow3-Mar-05 2:35 
GeneralRe: Problem with polymorphism Pin
ng kok chuan2-Mar-05 20:01
ng kok chuan2-Mar-05 20:01 
GeneralRe: Problem with polymorphism Pin
Cedric Moonen2-Mar-05 20:36
Cedric Moonen2-Mar-05 20:36 
GeneralRe: Problem with polymorphism Pin
Steen Krogsgaard2-Mar-05 21:40
Steen Krogsgaard2-Mar-05 21:40 
GeneralRe: Problem with polymorphism Pin
Alton Williams5-Mar-05 4:03
Alton Williams5-Mar-05 4:03 
GeneralC++ Wrapper for libCURL Pin
a_diwakar2-Mar-05 17:02
a_diwakar2-Mar-05 17:02 
Questionhow to use a video codec to compress avi file Pin
Mohsen Saad2-Mar-05 15:22
Mohsen Saad2-Mar-05 15:22 
GeneralText to matrix conversion Pin
SeanSheehan2-Mar-05 14:32
SeanSheehan2-Mar-05 14:32 
I'm a relatively new programmer and I was wondering if there was an easy way to read a text file of numbers seperated by spaces into a matrix. Here's what I got:


	int i, j;<br />
	short ImageArray[IMAGE_SIZE_X][IMAGE_SIZE_Y];<br />
<br />
	//Set Filename <br />
	char *FileName = C:\Image.asc;<br />
<br />
	//Open file<br />
	ifstream ImageFile;<br />
	ImageFile.open(FileName);<br />
	<br />
	//Read file data into array<br />
	for(i=0; i<IMAGE_SIZE_Y; ++i)<br />
	{<br />
		for(j=0; j<IMAGE_SIZE_X; j++)<br />
			ImageFile >> ImageArray[i][j];<br />
	}<br />
	//Close file<br />
	ImageFile.close();


I know I'm reading it wrong but I don't know the correct way to do it. Any help would be greatly appreciated.
GeneralSmall executables Pin
Verolix2-Mar-05 13:49
Verolix2-Mar-05 13:49 
GeneralRe: Small executables Pin
ThatsAlok2-Mar-05 18:00
ThatsAlok2-Mar-05 18:00 
Generalresizing workarea Pin
ahto1112-Mar-05 12:07
ahto1112-Mar-05 12:07 
GeneralC++ library Pin
Ahmed Adel2-Mar-05 11:33
Ahmed Adel2-Mar-05 11:33 
GeneralRe: C++ library Pin
ThatsAlok2-Mar-05 18:10
ThatsAlok2-Mar-05 18:10 
QuestionError? Pin
Larsson2-Mar-05 10:53
Larsson2-Mar-05 10:53 
AnswerRe: Error? Pin
Ravi Bhavnani2-Mar-05 10:55
professionalRavi Bhavnani2-Mar-05 10:55 
GeneralRe: Error? Pin
Larsson2-Mar-05 10:57
Larsson2-Mar-05 10:57 
GeneralRe: Error? Pin
Ravi Bhavnani2-Mar-05 11:01
professionalRavi Bhavnani2-Mar-05 11:01 
GeneralRe: Error? Pin
Larsson2-Mar-05 11:06
Larsson2-Mar-05 11:06 
GeneralRe: Error? Pin
Christian Graus2-Mar-05 11:07
protectorChristian Graus2-Mar-05 11:07 
GeneralRe: Error? Pin
Larsson2-Mar-05 11:10
Larsson2-Mar-05 11:10 
GeneralRe: Error? Pin
Christian Graus2-Mar-05 11:13
protectorChristian Graus2-Mar-05 11:13 
GeneralRe: Error? Pin
David Crow3-Mar-05 2:42
David Crow3-Mar-05 2:42 
AnswerRe: Error? Pin
Antony M Kancidrowski2-Mar-05 11:23
Antony M Kancidrowski2-Mar-05 11:23 
GeneralRe: Error? Pin
Larsson2-Mar-05 11:37
Larsson2-Mar-05 11:37 
GeneralRe: Error? Pin
Christian Graus2-Mar-05 11:55
protectorChristian Graus2-Mar-05 11:55 

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.