Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual Studio .net output window Pin
bryce9-Dec-03 14:52
bryce9-Dec-03 14:52 
GeneralRe: Visual Studio .net output window Pin
Jörgen Sigvardsson10-Dec-03 0:36
Jörgen Sigvardsson10-Dec-03 0:36 
GeneralNeed help with MFC Pin
m0rbac9-Dec-03 12:35
m0rbac9-Dec-03 12:35 
GeneralRe: Need help with MFC Pin
Christian Graus9-Dec-03 12:47
protectorChristian Graus9-Dec-03 12:47 
GeneralRe: Need help with MFC Pin
Ravi Bhavnani9-Dec-03 13:03
professionalRavi Bhavnani9-Dec-03 13:03 
GeneralRe: Need help with MFC Pin
m0rbac9-Dec-03 22:56
m0rbac9-Dec-03 22:56 
GeneralRe: Need help with MFC Pin
JWood9-Dec-03 14:57
JWood9-Dec-03 14:57 
GeneralNeed help with storing information into arrays Pin
Snyp9-Dec-03 12:14
Snyp9-Dec-03 12:14 
I need to first of all read a line of a file until a newling or '\n'. I would then store that to a string and put it into the first element in the array, then I will turn the previous string to empty then read the line until another newline '\n' and store that line to a string which will be stored at the next array element. I know that I have to allocate the array since I don't know how much lines will be in the array, could be hundreds to thousands of elements but I need to do this in win32. I will do the storing into the array elements until the end of the file is reached. I will be very happy if someone could help me, I so far have the following code:


int *p;<br />
		int uc = 0;<br />
		string all;<br />
		cout <<"has something in it\n";<br />
		try<br />
		{<br />
			p = new int;<br />
		}<br />
		catch(bad_alloc xa)<br />
		{<br />
			cout << "Allocation Failure\n";<br />
			exit(1);<br />
		}<br />
		do<br />
		{<br />
			all = null;<br />
			do<br />
			{<br />
				all = all + data.get();				<br />
			} while(data.get != '\n');<br />
			p[uc] = all;<br />
			uc++;<br />
		} while(data);<br />
		delete []p;


Please help me, I would appreciate it if someone can make a similair but simpler program like this or help me with this or even an article about this if anyone know something like this.Smile | :) Confused | :confused: Smile | :) Confused | :confused:
GeneralRe: Need help with storing information into arrays Pin
Christian Graus9-Dec-03 12:22
protectorChristian Graus9-Dec-03 12:22 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 12:30
Snyp9-Dec-03 12:30 
GeneralRe: Need help with storing information into arrays Pin
Christian Graus9-Dec-03 12:33
protectorChristian Graus9-Dec-03 12:33 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 12:45
Snyp9-Dec-03 12:45 
GeneralRe: Need help with storing information into arrays Pin
Christian Graus9-Dec-03 12:46
protectorChristian Graus9-Dec-03 12:46 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 12:48
Snyp9-Dec-03 12:48 
GeneralRe: Need help with storing information into arrays Pin
Christian Graus9-Dec-03 12:49
protectorChristian Graus9-Dec-03 12:49 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 13:46
Snyp9-Dec-03 13:46 
GeneralRe: Need help with storing information into arrays Pin
Christian Graus9-Dec-03 13:50
protectorChristian Graus9-Dec-03 13:50 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 14:57
Snyp9-Dec-03 14:57 
GeneralRe: Need help with storing information into arrays Pin
Christian Graus10-Dec-03 8:55
protectorChristian Graus10-Dec-03 8:55 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 13:52
Snyp9-Dec-03 13:52 
GeneralRe: Need help with storing information into arrays Pin
Snyp9-Dec-03 13:46
Snyp9-Dec-03 13:46 
GeneralRe: Need help with storing information into arrays Pin
David Crow10-Dec-03 3:40
David Crow10-Dec-03 3:40 
Generalconverting this code tot non-mfc Pin
Tommy2k9-Dec-03 11:38
Tommy2k9-Dec-03 11:38 
GeneralRe: converting this code tot non-mfc Pin
Uma Mahes9-Dec-03 18:13
Uma Mahes9-Dec-03 18:13 
Generalmake a comparision with excel Pin
aguest9-Dec-03 11:23
aguest9-Dec-03 11: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.