Error?! Where?!

Mysterious error keeps coming up, can anyone help?

Page 1 of 1

12 Replies - 1011 Views - Last Post: 30 April 2009 - 08:41 PM Rate Topic: -----

#1 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Error?! Where?!

Posted 30 April 2009 - 07:36 PM

I modified a little something in my program and clicked to rebuild solution, and it said I had four errors. It wouldn't tell me anything about them, thought maybe I could undo and figure it out... I undoed until I got back to the last successful build and it was still saying I had one error. I redo everything and it says I have one error.
It finally tells me something about the error:
Project : error PRJ0002 : Error result -1073741502 returned from 'E:\Asj's Stuff\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'

What in the world does it mean and what can I do to fix it? I have to turn in the program in about an hour and I can't finish it...

O_o Well, I did something, it said I had four errors again, and then I did something else and it seems fixed. Still, anyone know what's up with it?
... And now it says I have five errors.

This post has been edited by asj127: 30 April 2009 - 07:40 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Error?! Where?!

#2 apw5020  Icon User is offline

  • D.I.C Addict

Reputation: 78
  • View blog
  • Posts: 666
  • Joined: 26-March 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:40 PM

Is your code too long to post? What were the other errors your were getting?
Was This Post Helpful? 0
  • +
  • -

#3 computerfox  Icon User is offline

  • straight vegetarian kid

Reputation: 50
  • View blog
  • Posts: 3,772
  • Joined: 29-January 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:42 PM

we can't answer your question if we can't see your code :wink:

and please don't forget to use the code tags
Was This Post Helpful? 0
  • +
  • -

#4 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:47 PM

Try hitting "Clean Solution" and then rebuilding. I find that VS has a little habit of corrupting the files or something. The only way to fix it is to hit "Clean Solution".

This may not be the problem at all, but that looks similar to the error message I get with VC++ when I need to clean the solution.
Was This Post Helpful? 0
  • +
  • -

#5 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:49 PM

sorry, I can't really see how my code has to do with the errors because it was still giving me errors when I cut out the code in the function I was working on. It used to work fine before I added any code in it...

Here's the function, but I'm not sure how much is understandable. (and it says I have five errors at the moment, by the way) I was adding the count variable to the do while loops right before it started acting strange.

void rr()
{
	int nj=0;
	int time=0; // time keeps track of the current cpu cycle number
	int jobsFin=0;
	int quantum=4; // will change when user inputs a different value
	int index; // keeps track of current job

	int **jobArray=input(nj);

	/* jobArray is a dynamic, 2D array.
	---the indexes for each job array means different things in rr than in the other algorithms---
	the x axis represents jobs (nj=number of jobs)
	the y axis represents job id (index 0), job arrival time (index 1), job cpu cycle time (index 2),
	finished marker (index 3), current finishing/stop time (index 4), and waiting time (index 5) */

	int *tT; // turnaround time dynamic array
	tT=new int[nj];

	for (int i=0; i<nj; i++) // set current finish times to arrival time to help calculate waiting times
		jobArray[i][4]=jobArray[i][1];
	cout << "What should the time quantum be? (a possitive integer, in ms) " << endl;
	cin >> quantum;

	int *temp; // for use if arrival times may be random
	temp=new int[6];
	for (int j=1; j<nj; j++)
	{
		int i=j-1;
		while (i>-1 && jobArray[i][1]>jobArray[i+1][1])
		{
			temp=jobArray[i];
			jobArray[i]=jobArray[i+1];
			jobArray[i+1]=temp;
		}
	} //*/
	index=0;
	while (jobArray[index][1]<time)
		time++;

	while (jobsFin < nj)
	{
		if (jobArray[index][2]>quantum) // if job isn't going to finish this turn...
		{
			time+=quantum;
			jobArray[index][2]-=quantum;
			int count=0;
			do
			{
				if (index<nj-1) // switch jobs. When index reaches the end of the jobs, it starts over
					index++;
				else
					index=0;
				count++;
				if (count==(nj-1))
				{
					time++;
					count=0;
				}
			} while (jobArray[index][3]==1 || jobArray[index][1]<time);
			jobArray[index][5]=time-jobArray[index][4]; // add waiting time to the waiting time index
			cout << "job " << jobArray[index][0] << " finished." << endl; // test
		}
		else if (jobArray[index][2]<quantum) // if job will finish before the end of it's turn...
		{
			time++; // increment time, and decrement cycle time, each time around the loop until the job finishes.
			jobArray[index][2]--;
		}
		else // if job has ended...
		{
			jobArray[index][4]=time;
			jobsFin++;
			jobArray[index][3]=1;
			count=0;
			do
			{
				if (index<nj-1) // switch jobs. When index reaches the end of the jobs, it starts over
					index++;
				else
					index=0;
				count++;
				if (count==(nj-1))
				{
					time++;
					count=0;
				}
			} while (jobArray[index][3]==1 || jobArray[index][1]<time);
			jobArray[index][5]=time-jobArray[index][4]; // add waiting time to the waiting time index
			cout << "job " << jobArray[index][0] << " finished." << endl; // test
		}
	}

	int *temp; // for use if arrival times may be random
	for (j=1; j<nj; j++)
	{
		i=j-1;
		while (i>-1 && jobArray[i][0]>jobArray[i+1][0])
		{
			temp=jobArray[i];
			jobArray[i]=jobArray[i+1];
			jobArray[i+1]=temp;
		}
	} //*/

	for (int i=0; i<nj; i++)
		tT[i]=jobArray[i][4]-jobArray[i][1];

	cout << "Turnaround times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << tT[i] << ", ";
	cout << endl << endl;
	cout << "Waiting times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << jobArray[i][5] << ", ";
	cout << endl << endl;
	cout << "Average turnaround time:" << endl;
	float sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=tT[i];
	cout << sum/nj << endl << endl;
	cout << "Average waiting time:" << endl;
	sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=jobArray[i][5];
	cout << sum/nj << endl << endl;
	
	menu();
}


I found the clean solution thing a few minutes ago, and it seemed to work for a moment, then it happened again...

This post has been edited by asj127: 30 April 2009 - 07:50 PM

Was This Post Helpful? 0
  • +
  • -

#6 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:54 PM

Hit it again then. Sometimes you have to hit it often.

Did the code compile once or twice and then it stopped working?

Could you post your entire program so we can copy/paste it and compile it and check?
Was This Post Helpful? 0
  • +
  • -

#7 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 07:58 PM

Hmm... it's super long.
I tried the clean solution thing again and it still says 5 errors. It might have something to do with the two things I decommented (both say "for use with" at the first line of the blocks and have the */'s at the end still) or with the do while loops, because it was working fine right before that.

//	Angela Johnson
//	a program that simulates four scheduling algorithms:
//		FCFS, SJN, SRT, RR

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;

void menu();
int** input(int &nj);
void fcfs();
void sjn();
void srt();
void rr();
void quit();
bool jobRunning(int **jobArray, const int nj);

void main()
{
	menu();
}

void menu()
{
	int mV=0;
	while (true)
	{
		mV=0;
		cout << "ALGORITHM MENU" << endl;
		cout << "1. First-Come First-Served (FCFS)" << endl;
		cout << "2. Shortest Job Next (SJN)" << endl;
		cout << "3. Shortest Remaining Time (SRT)" << endl;
		cout << "4. Round Robin (RR)" << endl;
		cout << "5. Quit" << endl << endl;
		cout << "Choose a menu number: ";
		cin >> mV;
		cout << endl;
		if (mV > 0 && mV <= 5)
			break;
		cout << "choose a number between 1 and 5\n" << endl;
	}

	switch (mV)
	{
	case 1:
		fcfs();
		break;
	case 2:
		sjn();
		break;
	case 3:
		srt();
		break;
	case 4:
		rr();
		break;
	case 5:
		quit();
		break;
	}
}

void fcfs()
{
	int nj=0;
	int time=0; // time keeps track of the current cpu cycle number

	int **jobArray=input(nj);

	/* jobArray is a dynamic, 2D array.
	the x axis represents jobs (nj=number of jobs)
	the y axis represents job id (index 0), job arrival time (index 1), job cpu cycle time (index 2),
	job starting time (index 3), job finishing time (index 4), and currently running job (index 5)
	last three for use in other algorithms */

	int *tT; // turnaround time dynamic array
	tT=new int[nj];
	tT[0]=jobArray[0][2];
	int *wT; // waiting time dynamic array
	wT=new int[nj];
	wT[0]=0; // there is no waiting time for the first job
	time=jobArray[0][1]+jobArray[0][2]; // after the first job, the current time is
								//the job's arrival time plus the job's cpu cycle time
	for (int i=1; i<=(nj-1); i++) //cycles through jobs
	{
		if (jobArray[i][1]<=time) // if the job had to wait...
		{
			tT[i]=time-jobArray[i][1]+jobArray[i][2];
			wT[i]=time-jobArray[i][1];
			time+=jobArray[i][2];
		}
		else // if the job didn't have to wait...
		{
			tT[i]=jobArray[i][1]+jobArray[i][2];
			wT[i]=0;
			time=jobArray[i][1]+jobArray[i][2];
		}
	}
	cout << "Turnaround times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << tT[i] << ", ";
	cout << endl << endl;
	cout << "Waiting times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << wT[i] << ", ";
	cout << endl << endl;
	cout << "Average turnaround time:" << endl;
	float sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=tT[i];
	cout << sum/nj << endl << endl;
	cout << "Average waiting time:" << endl;
	sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=wT[i];
	cout << sum/nj << endl << endl;

	menu();
}

void sjn()
{
	int nj=0;
	int time=0; // time keeps track of the current cpu cycle number
	int jobsFin=0;

	int **jobArray=input(nj);

	/* jobArray is a dynamic, 2D array.
	the x axis represents jobs (nj=number of jobs)
	the y axis represents job id (index 0), job arrival time (index 1), job cpu cycle time (index 2),
	job starting time (index 3), job finishing time (index 4), and currently running job (index 5)*/

	int *tT; // turnaround time dynamic array
	tT=new int[nj];
	int *wT; // waiting time dynamic array
	wT=new int[nj];

	while (jobsFin<nj)
	{
		//finds and picks lowest arrival time - if it's a tie, the lowest cycle time is picked
		int index=-1; //keeps track of which job the lowest is
		for (int i=0; i<nj; i++) // pick a starting index
		{
			if (jobArray[i][4]==0 && jobArray[i][1]<=time)
			{
				index=i;
				break;
			}
		}
		for (int i=0; i<nj; i++)
		{
			if (jobArray[i][4]==0 && jobArray[i][1]<=time && jobArray[i][2]<jobArray[index][2])
				index=i;
		}

		if (index!=-1)
		{
			jobArray[index][3]=time;
			jobArray[index][4]=time+jobArray[index][2];
			jobsFin++;
			time+=jobArray[index][2];
		}
		else // if there are no jobs at this time, increment time
			time++;
	}

	for (int i=0; i<nj; i++)
	{
		tT[i]=jobArray[i][4]-jobArray[i][1];
		wT[i]=jobArray[i][3]-jobArray[i][1];
	}
		cout << "Turnaround times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << tT[i] << ", ";
	cout << endl << endl;
	cout << "Waiting times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << wT[i] << ", ";
	cout << endl << endl;
	cout << "Average turnaround time:" << endl;
	float sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=tT[i];
	cout << sum/nj << endl << endl;
	cout << "Average waiting time:" << endl;
	sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=wT[i];
	cout << sum/nj << endl << endl;

	menu();
}

void srt()
{
	int nj=0;
	int time=0; // time keeps track of the current cpu cycle number
	int jobsFin=0; // increments when a job finishes.

	int **jobArray=input(nj);

	/* jobArray is a dynamic, 2D array.
	the x axis represents jobs (nj=number of jobs)
	the y axis represents job id (index 0), job arrival time (index 1), job cpu cycle time (index 2),
	job starting time (index 3), job finishing time (index 4), and currently running job (index 5)*/

 /* 1. find the lowest aT, using a loop (jobArray[i][1])
	2. use a "current" pointer to point to the job (jobArray[n])
	3. Begin loop: increment "time", check whether "jobsFin" < nj
	4. - check to see if there is a job currently running
	5. - - if so, decrement that job's cycle time (jobArray[n][2]--)
	6. - - check to see if the cycle time == 0
	7. - - - make finTime=time, increment "jobsFin", and remove "current" marker.
	8. - - else loop through jobs
	9. - - - - check to see if other jobs cycle times are <= the current one's cyc (jobArray[i][2]<=jobArray[n][2])
	10.- - - - - check to see if the other jobs that are <= current cyc also has an arrival time <= time
	11.- - - - - - if so, pick the job with the lowest cycle time
	12.- - - - 
 */

	int *tT; // turnaround time dynamic array (find tT's by subtracting finish Time and arrival time)
	tT=new int[nj];
	int *wT; // waiting time dynamic array (find wT's by subtracting starting time and arrival time)
	wT=new int[nj];

	//finds lowest arrival time in order to begin first job - if it's a tie, the lowest cycle time
	int index=0; //keeps track of which job the lowest is
	for (int i=1; i<nj; i++)
	{
		if (jobArray[index][1]>jobArray[i][1])
		{
			index=i;
		}
		if (jobArray[index][1]==jobArray[i][1] && jobArray[index][2]>jobArray[i][2])
		{
			index=i;
		}
	}	
	jobArray[index][5]=1;
	time=jobArray[index][1];
	jobArray[index][3]=time;
//	cout << jobArray[index][0] << endl; // a test to see if the correct job was choosen

	while (jobsFin < nj) // while there are still jobs unfinished...
	{
		time++; // checks for a shorter cycle time, each cpu cycle
		if (jobRunning(jobArray, nj))
		{
			jobArray[index][2]--;
			if (jobArray[index][2]==0) // if the job is finished...
			{
				jobArray[index][4]=time;
				jobArray[index][5]=0;
				jobsFin++;
//				cout << jobsFin << " jobs are finished." << endl; // test
				for (int i=0; i<nj; i++) // pick a starting index
				{
					if (jobArray[i][4]==0 && jobArray[i][1]<=time)
					{
						index=i;
						break;
					}
				}
				for (int i=0; i<nj; i++)
				{
					if (jobArray[i][4]==0 && jobArray[i][1]<=time && jobArray[i][2]<jobArray[index][2])
						index=i;
				}
				jobArray[index][5]=1;
				if (jobArray[index][3]==-1)
					jobArray[index][3]=time;
			}

			else
			{
				for (int i=0; i<nj; i++)
				{
					if (jobArray[i][4]==0) // if the job isn't finished...
					{
						if (jobArray[i][2]<jobArray[index][2] && jobArray[i][1]<=time)
						{
								index=i; // switch jobs if cpu cycle's lower and arrival time isn't in the future
						}
					}
				}
				if (jobArray[index][3]==-1) // if the job's first starting, save the time
					jobArray[index][3]=time;
			}
		}
		else // if there isn't a job currently running
		{
			for (int i=0; i<nj; i++) // pick a starting index
			{
				if (jobArray[i][4]==0 && jobArray[i][1]<=time)
				{
					index=i;
					break;
				}
			}
			for (int i=0; i<nj; i++)
			{
				if (jobArray[i][4]==0 && jobArray[i][1]<=time && jobArray[i][2]<jobArray[index][2])
					index=i;
			}
			jobArray[index][5]=1;
			if (jobArray[index][3]==-1)
				jobArray[index][3]=time;
		}

	}

//	cout << "Test" << endl;

	for (int i=0; i<nj; i++)
	{
		tT[i]=jobArray[i][4]-jobArray[i][1];
		wT[i]=jobArray[i][3]-jobArray[i][1];
	}

	cout << "Turnaround times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << tT[i] << ", ";
	cout << endl << endl;
	cout << "Waiting times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << wT[i] << ", ";
	cout << endl << endl;
	cout << "Average turnaround time:" << endl;
	float sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=tT[i];
	cout << sum/nj << endl << endl;
	cout << "Average waiting time:" << endl;
	sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=wT[i];
	cout << sum/nj << endl << endl;

	menu();
}

void rr()
{
	int nj=0;
	int time=0; // time keeps track of the current cpu cycle number
	int jobsFin=0;
	int quantum=4; // will change when user inputs a different value
	int index; // keeps track of current job

	int **jobArray=input(nj);

	/* jobArray is a dynamic, 2D array.
	---the indexes for each job array means different things in rr than in the other algorithms---
	the x axis represents jobs (nj=number of jobs)
	the y axis represents job id (index 0), job arrival time (index 1), job cpu cycle time (index 2),
	finished marker (index 3), current finishing/stop time (index 4), and waiting time (index 5) */

	int *tT; // turnaround time dynamic array
	tT=new int[nj];

	for (int i=0; i<nj; i++) // set current finish times to arrival time to help calculate waiting times
		jobArray[i][4]=jobArray[i][1];
	cout << "What should the time quantum be? (a possitive integer, in ms) " << endl;
	cin >> quantum;

	int *temp; // for use if arrival times may be random
	temp=new int[6];
	for (int j=1; j<nj; j++)
	{
		int i=j-1;
		while (i>-1 && jobArray[i][1]>jobArray[i+1][1])
		{
			temp=jobArray[i];
			jobArray[i]=jobArray[i+1];
			jobArray[i+1]=temp;
		}
	} //*/
	index=0;
	while (jobArray[index][1]<time)
		time++;

	while (jobsFin < nj)
	{
		if (jobArray[index][2]>quantum) // if job isn't going to finish this turn...
		{
			time+=quantum;
			jobArray[index][2]-=quantum;
			int count=0;
			do
			{
				if (index<nj-1) // switch jobs. When index reaches the end of the jobs, it starts over
					index++;
				else
					index=0;
				count++;
				if (count==(nj-1))
				{
					time++;
					count=0;
				}
			} while (jobArray[index][3]==1 || jobArray[index][1]<time);
			jobArray[index][5]=time-jobArray[index][4]; // add waiting time to the waiting time index
			cout << "job " << jobArray[index][0] << " finished." << endl; // test
		}
		else if (jobArray[index][2]<quantum) // if job will finish before the end of it's turn...
		{
			time++; // increment time, and decrement cycle time, each time around the loop until the job finishes.
			jobArray[index][2]--;
		}
		else // if job has ended...
		{
			jobArray[index][4]=time;
			jobsFin++;
			jobArray[index][3]=1;
			count=0;
			do
			{
				if (index<nj-1) // switch jobs. When index reaches the end of the jobs, it starts over
					index++;
				else
					index=0;
				count++;
				if (count==(nj-1))
				{
					time++;
					count=0;
				}
			} while (jobArray[index][3]==1 || jobArray[index][1]<time);
			jobArray[index][5]=time-jobArray[index][4]; // add waiting time to the waiting time index
			cout << "job " << jobArray[index][0] << " finished." << endl; // test
		}
	}

	int *temp; // for use if arrival times may be random
	for (j=1; j<nj; j++)
	{
		i=j-1;
		while (i>-1 && jobArray[i][0]>jobArray[i+1][0])
		{
			temp=jobArray[i];
			jobArray[i]=jobArray[i+1];
			jobArray[i+1]=temp;
		}
	} //*/

	for (int i=0; i<nj; i++)
		tT[i]=jobArray[i][4]-jobArray[i][1];

	cout << "Turnaround times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << tT[i] << ", ";
	cout << endl << endl;
	cout << "Waiting times:" << endl;
	for (int i=0; i<=(nj-1); i++)
		cout << "Job " << jobArray[i][0] << ": " << jobArray[i][5] << ", ";
	cout << endl << endl;
	cout << "Average turnaround time:" << endl;
	float sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=tT[i];
	cout << sum/nj << endl << endl;
	cout << "Average waiting time:" << endl;
	sum=0;
	for (int i=0; i<=(nj-1); i++)
		sum+=jobArray[i][5];
	cout << sum/nj << endl << endl;
	
	menu();
}

void quit()
{
	char ans='n';
	cout << "Are you certain you want to quit? (y or n): ";
	cin >> ans;
	if (ans=='y' || ans=='Y')
		cout << "Goodbye" << endl;
	else
	{
		cout << endl;
		menu();
	}
}

int** input(int &nj)
{
	int num=0;
	int **jobArray;
	int ydim=6;
	string fileAd="";
	cout << "Please enter the address of the input file which tells \ninformation for the jobs: ";
	cin >> fileAd;
	ifstream file (fileAd.c_str());
	if (file.is_open())
	{
		file >> nj;
		jobArray=new int *[nj];
		for (int i=0; i<nj; i++)
			jobArray[i]=new int[ydim];
		while (! file.eof() )
		{
			file >> jobArray[num][0] >> jobArray[num][1] >> jobArray[num][2];
			jobArray[num][3]=-1;
			jobArray[num][4]=0;
			jobArray[num][5]=0;
			num+=1;
		}
		file.close();
	}
	else
		cout << "The file could not be opened." << endl;

/*	for (int i=0; i<nj; i++)
	{
		for (int j=0; j<ydim; j++)
			cout << jobArray[i][j] << " ";
		cout << endl;
	}*/
	cout << endl;
	return jobArray;
}

bool jobRunning(int **jobArray, const int nj)
{
	for (int i=0; i<nj; i++)
	{
		if (jobArray[i][5]!=0)
			return true;
	}
	return false;
}

Was This Post Helpful? 0
  • +
  • -

#8 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:05 PM

I found the error in about 30 seconds with the full code.

Line 351 (int index;) After that line add this:
int count =  0;


Line 438 (int * temp;) can be deleted. It is a redefinition.

Line 441 (i = j -1;) Change that to (int i = j -1;)
Was This Post Helpful? 0
  • +
  • -

#9 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:08 PM

(can I double post on here?)
I created a new solution/project thingy and it seems to be working there... (although I'm worried if it might mess up again)

Could it not tell me what errors are if my memory is used up? I kind'a realized a minute ago that I had to close a few windows to be able to make a new project.

Edit: It told the errors when I pasted it into a new project and I fixed them. Right now it says I have none (but I can't seem to open the input file... perhaps I just need to close a few more windows...)
Edit 2: oh. New address... opps.

This post has been edited by asj127: 30 April 2009 - 08:15 PM

Was This Post Helpful? 0
  • +
  • -

#10 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:12 PM

Did you correct the errors?

Is your computer really old or did you have 50 windows open? I have never had that happen.
Was This Post Helpful? 0
  • +
  • -

#11 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:28 PM

I got laptop as a graduation present and I graduated in 2005.
I've been hibernating it for a few days and I have 2 Photoshop files and 3 Paint documents opened, along with a few other little things. It seems to build up over the days until I have to close almost everything before I can open something.

Um... can you help me figure out how to make rr work? It's not finishing the function and my test that tells what jobs are finished, when, is wrong.
It's supposed to say job 4, job 3, job 1, job 5, and job 2 - instead it's saying 2, 5, 4, 5, 4, 5, 1, 2, 3, 4, 1. (well, most of those numbers are after waiting for a few minutes)

my input file is:

5
1 3 10
2 4 15
3 6 8
4 7 3
5 9 12

I'm kind'a tired and don't know if I can work my way through the loops...
Was This Post Helpful? 0
  • +
  • -

#12 eker676  Icon User is offline

  • Software Engineer
  • member icon

Reputation: 378
  • View blog
  • Posts: 1,833
  • Joined: 18-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:33 PM

I don't have anymore time to analyze the code right now. You will have to figure something out.
Was This Post Helpful? 0
  • +
  • -

#13 asj127  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 157
  • Joined: 29-April 09

Re: Error?! Where?!

Posted 30 April 2009 - 08:41 PM

Maybe I can find the problem...

I started looking through it, and the very first line I looked at... 3<0... I couldn't think if it was right or not for a few seconds. ^_^" And then after careful thought, I realized I meant to say 3>=0. And so, I must have been working too hard on this thing. ^_^"
But, finding that makes me feel like maybe I can get it fixed in time.

Edit: found it. when everything's finished, it's supposed to break out of a do-while loop, but it didn't work that way. (it took me 36 minutes to go through the whole thing. O_o of course, I did go through the loops several times... I should've used a simplier test document.

This post has been edited by asj127: 30 April 2009 - 09:45 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1