Weird errors in code

This is a discussion on Weird errors in code within the C++ Programming forums, part of the General Programming Boards category; Hey guys, I don't really understand the errors I'm geting... can anyone help?? C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(217) : error C2143: ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    27

    Weird errors in code

    Hey guys, I don't really understand the errors I'm geting... can anyone help??

    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(217) : error C2143: syntax error : missing ';' before '.'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(217) : error C2501: 'CoolFile' : missing storage-class or type specifiers
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(217) : error C2143: syntax error : missing ';' before '.'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(219) : error C2143: syntax error : missing ';' before '.'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(219) : error C2501: 'cin' : missing storage-class or type specifiers
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(219) : error C2371: 'cin' : redefinition; different basic types
    c:\program files\microsoft visual studio\vc98\include\istream.h(173) : see declaration of 'cin'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(219) : error C2143: syntax error : missing ';' before '.'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(220) : error C2556: 'int __cdecl main(void)' : overloaded function differs only by return type from 'void __cdecl main(void)'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(30) : see declaration of 'main'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(220) : error C2371: 'main' : redefinition; different basic types
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(30) : see declaration of 'main'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(222) : error C2143: syntax error : missing ';' before '}'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(222) : error C2143: syntax error : missing ';' before '}'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(222) : error C2143: syntax error : missing ';' before '}'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(229) : error C2143: syntax error : missing ';' before '{'
    C:\Program Files\Microsoft Visual Studio\RecipeFinder\Recipes.cpp(229) : error C2447: missing function header (old-style formal list?)
    Error executing cl.exe.

    Here is the code itself:
    Code:
    #include <string.h>
    #include <iostream.h>
    #include <stdlib.h>
    #include <fstream.h>
    
    struct ingredient
    {
    	int quantity;
    	char name[41];
    };
    
    struct instruction
    {
    	char instr[81];
    };
    
    struct recipe
    {
    	char name[71], type[31], dateAdded[9];
    	ingredient ingredients[26];
    	instruction instructions[26];
    	int difficulty, peopleServed, numIngredient, numInstructions;
    };
    
    void addRecipe(int *current, recipe *aryCurr);
    void deleteRecipe(int *current, recipe *aryCurr);
    void findRecipe(int *current, recipe *aryCurr);
    void viewRecipe(int *current, recipe *aryCurr);
    
    void main()
    {
    	recipe Recipes[100], *currRecipe;
    	int currentRecipe=0, *ptrCurrent, choice =0, x,g;
    	//LOAD RECIPES
    
    	ifstream CoolFile("C:\\recipes.dat");
    	if (CoolFile)
    	{
    		CoolFile >> currentRecipe;
    
    		for (x =0; x <=currentRecipe; x++)
    		{
    			CoolFile.getline(Recipes[x].name, 70);
    			CoolFile.getline(Recipes[x].type, 30);
    			CoolFile >> Recipes[x].difficulty;
    			CoolFile >> Recipes[x].peopleServed;
    			CoolFile.getline(Recipes[x].dateAdded, 8);
    			CoolFile >> Recipes[x].numIngredient;
    			CoolFile >> Recipes[x].numInstructions;
    
    			for (g=0;g <=((Recipes[x].numIngredient)-1);g++)
    			{
    				CoolFile.getline(Recipes[x].ingredients[g].name, 40);
    				CoolFile >> Recipes[x].ingredients[g].quantity;
    			}
    
    			for (g=0;g <=((Recipes[x].numInstructions)-1);g++)
    			{
    				CoolFile.getline(Recipes[x].instructions[g].instr, 80);
    			}
    
    		}
    		CoolFile.close();
    	}
    	else
    	{
    		cout << "\nFile couldn't be loaded... creating new.\n";
    		CoolFile.close();
    	}
    		
    	/*
    	//DEBUG INFO
    	strcpy(Recipes[0].dateAdded, "04/18/87");
    	strcpy(Recipes[0].name, "Cookies");
    	strcpy(Recipes[0].type, "Cookie");
    	Recipes[0].difficulty = 2;
    	Recipes[0].peopleServed = 3;
    	Recipes[0].numIngredient  = 2;
    	Recipes[0].numInstructions = 2;
    
    	strcpy(Recipes[0].ingredients[0].name, "Cow");
    	Recipes[0].ingredients[0].quantity = 2;
    
    	strcpy(Recipes[0].ingredients[1].name, "Donkey");
    	Recipes[0].ingredients[1].quantity = 3;
    
    	strcpy(Recipes[0].instructions[0].instr, "Kill me");
    	strcpy(Recipes[0].instructions[1].instr, "And make this program work.");
    	//DEBUG OVER
    	*/
    
    	cout << "ERIK'S RECIPE PROGRAM\n-------------------------------------------\n";
    	cout << "\n1. Add a recipe\n2. Delete a recipe\n3. Find/View a recipe\n4. Exit\n\n";
    	cin >> choice;
    	switch (choice)
    	{
    	case 1:
    		currentRecipe++;
    		currRecipe = &Recipes[currentRecipe];
    		ptrCurrent = &currentRecipe;
    		addRecipe(ptrCurrent, currRecipe);
    		main();
    		break;
    	case 2:
    		//deleteRecipe();
    		break;
    	case 3:
    		currRecipe = &Recipes[0];
    		ptrCurrent = &currentRecipe;
    		viewRecipe(ptrCurrent, currRecipe);
    		break;
    	case 4:
    		cout << "\n\n\n\n    Are you sure you want to exit? (Y/N)>  ";
    		char chooser;
    		cin >> chooser;
    		cout << "\n";
    		if (chooser == 'y'|| chooser == 'Y')
    			exit(1);
    		else
    			cout << "\n\n\n\n\n\n";
    			main();
    		break;
    	default:
    		cout << "\n\n\n\n\n\n";
    		main();
    		break;
    	}
    }
    
    
    
    void addRecipe(int *current, recipe *aryCurr)
    {
    	char junk[3];
    	cout << "\n\n\n\t\t--Add a recipe--\n\n";
    	cout << "Please type the name of the recipe:\n";
    	cin.getline(junk, 2);
    	cin.getline(aryCurr->name, 70);
    
    	cout << "\nNow please enter the recipe type:\n";
    	cin.getline(aryCurr->type, 30);
    
    	cout << "\nPlease enter the difficulty of the recipe from 1-10\n";
    	while (aryCurr->difficulty < 0 || aryCurr->difficulty > 10)
    		cin >> aryCurr->difficulty;
    
    	cout << "\nNow please enter the amount of people served by the recipe:\n";
    	aryCurr->peopleServed = -1;
    	while (aryCurr->peopleServed < 1)
    		cin >> aryCurr->peopleServed;
    
    	strcpy(aryCurr->dateAdded, "04/18/87");
    
    	cout << "Please type the ingredients.  Type \"*\" to stop.\n";
    	int numberOfIngredients=0, numberOfInstructions=0, amount =0;
    	char ingredient[41], instruction[81];
    	strcpy(ingredient, "NULL");
    	strcpy(instruction, "NULL");
    
    	
    	while (strcmp(ingredient, "*") != 0 || numberOfIngredients < 26)
    	{
    		cout << "Name of ingredient?\n";
    		cin.getline(junk, 2);
    		cin.getline(ingredient, 40);
    		if(!strcmp(ingredient, "*"))
    			break;
    		cout << "Quantity of ingredient?\n";
    		cin >> amount;
    		strcpy(aryCurr->ingredients[numberOfIngredients].name, ingredient);
    		aryCurr->ingredients[numberOfIngredients].quantity = amount;
    		numberOfIngredients++;
    	}
    	cin.getline(junk, 2);
    	while (strcmp(instruction, "*") != 0 || numberOfInstructions < 26)
    	{
    		cout << "\nPlease type the instruction\n";
    		cin.getline(instruction, 80);
    		if(!strcmp(instruction, "*"))
    			break;
    		strcpy(aryCurr->instructions[numberOfInstructions].instr, instruction);
    		numberOfInstructions++;
    	}
    	
    	aryCurr->numIngredient = numberOfIngredients +1;
    	aryCurr->numInstructions = numberOfInstructions +1;
    	
    	int g;
    	//WRITE FILE
    	ofstream CoolFile("C:\\recipes.dat");
    
    	if (CoolFile)
    	{
    			CoolFile << aryCurr->name << endl;
    			CoolFile << aryCurr->type << endl;
    			CoolFile << aryCurr->difficulty << endl;
    			CoolFile << aryCurr->peopleServed << endl;
    			CoolFile << aryCurr->dateAdded << endl;
    			CoolFile << aryCurr->numIngredient << endl;
    			CoolFile << aryCurr->numInstructions << endl;
    			
    			for (g=0;g <=numberOfIngredients;g++)
    			{
    				CoolFile << aryCurr->ingredients[g].name << endl;
    				CoolFile << aryCurr->ingredients[g].quantity << endl;
    			}
    
    			for (g=0;g <=numberOfInstructions;g++)
    			{
    				CoolFile << aryCurr->instructions[g].instr << endl;
    			}
    			CoolFile.seekp(0);
    			CoolFile << *current << " " << endl;
    		}
    	}
    	
    	CoolFile.close();
    
    	cin.ignore(INT_MAX,'\n');
    	main();	
    }
    
    
    
    
    
    void viewRecipe(int *current, recipe *aryCurr)
    {
    	int choice, x, listed=-1, listedKey[16], recipeChoice = 20, searchDifficulty;
    	char chooser, junk[3];
    
    	cout << "\n\n\n\t\t--Find/View a recipe--\n\n";
    	cout << "1. View by name\n2. View by ID\n3. View by type\n4. View by difficulty\n5. Exit\n";
    	cin >> choice;
    
    	switch (choice)
    	{
    	case 1:
    		char *searchName, junk[3];
    		searchName = (char*)malloc(81);
    		cout << "\nPlease type the name of the recipe:\n";
    		cin.ignore(INT_MAX,'\n');
    		cin.getline(searchName, 80);
    		cin.ignore(INT_MAX,'\n');
    		for(x=0;x <= *current;x++)
    		{
    			if (strstr(strupr((aryCurr + x)->name), strupr(searchName)))
    			{
    				listed++;
    				cout << "\n" << listed+1 << ": " << aryCurr->name;
    				listedKey[listed] = (aryCurr+x)->id;
    				if(listed > 15)
    				{
    					cout << "\nContinue searching? (Y/N)";
    					cin >> chooser;
    					cin.ignore(INT_MAX,'\n');
    					if (chooser=='y' || chooser =='Y')
    					{
    						listed = 0;
    						cout << "\n\n\n\n\n\n\n\n\n\n";
    					}
    					else
    						break;
    				}
    			}
    		}
    		if (listed ==-1)
    		{
    			cout << "\nNo recipes matched!\n\n\n\n\n\n";
    			main();
    		}
    		cout << "\nType the number of recipe to view\n";
    		while (recipeChoice > (listed+1) || recipeChoice < 1)
    			cin >> recipeChoice;
    		cin.ignore(INT_MAX,'\n');
    		aryCurr += listedKey[recipeChoice-1];
    		cout << "\n\n\nID: " << aryCurr->id;
    		cout << "\nName: " << aryCurr->name;
    		cout << "\nType: " << aryCurr->type;
    		cout << "\nDifficulty: " << aryCurr->difficulty;
    		cout << "\nDate Added: " << aryCurr->dateAdded;
    		cout << "\nPeople Served: " << aryCurr->peopleServed;
    		cout << "\nNumber of ingredients: " << aryCurr->numIngredient;
    		cout << "\nNumber of instructions: " << aryCurr->numInstructions;
    
    		cout << "\n\nPress enter to see the ingredients\n";
    		cin.getline(junk,2);
    
    		cout << "\n\n #   Ingredient\n------------------------------------------------\n";
    		for (x=0; x <= (aryCurr->numIngredient -1); x++)
    		{
    			cout << "[" << aryCurr->ingredients[x].quantity << "]  " << aryCurr->ingredients[x].name << "\n";
    		}
    
    		cout << "\n\nPress enter to see the instructions\n";
    		cin.getline(junk,2);
    		cout << "\n\t\tINSTRUCTIONS\n-------------------------------------------------\n";
    
    		for (x=0; x <= (aryCurr->numInstructions -1); x++)
    		{
    			cout << "*Step " << x+1 << ")" << "  " << aryCurr->instructions[x].instr << "\n";
    		}
    
    		cout << "\n\nPress enter to return to main menu.\n\n\n\n\n\n\n\n";
    		cin >> junk;
    		cin.ignore(INT_MAX,'\n');
    		main();
    		break;
    
    	case 2:
    		int searchID;
    		cout << "\nPlease type the recipe ID:\n";
    		cin >> searchID;
    		cin.ignore(INT_MAX,'\n');
    		if (searchID > *current)
    		{
    			cout << "No such ID exists!!";
    			main();
    		}
    		aryCurr += searchID;
    		cout << "\n\n\nID: " << aryCurr->id;
    		cout << "\nName: " << aryCurr->name;
    		cout << "\nType: " << aryCurr->type;
    		cout << "\nDifficulty: " << aryCurr->difficulty;
    		cout << "\nDate Added: " << aryCurr->dateAdded;
    		cout << "\nPeople Served: " << aryCurr->peopleServed;
    		cout << "\nNumber of ingredients: " << aryCurr->numIngredient;
    		cout << "\nNumber of instructions: " << aryCurr->numInstructions;
    
    		cout << "\n\nPress enter to see the ingredients\n";
    		cin.getline(junk,2);
    
    		cout << "\n\n #   Ingredient\n------------------------------------------------\n";
    		for (x=0; x <= (aryCurr->numIngredient -1); x++)
    		{
    			cout << "[" << aryCurr->ingredients[x].quantity << "]  " << aryCurr->ingredients[x].name << "\n";
    		}
    
    		cout << "\n\nPress enter to see the instructions\n";
    		cin.getline(junk,2);
    		cout << "\n\t\tINSTRUCTIONS\n-------------------------------------------------\n";
    
    		for (x=0; x <= (aryCurr->numInstructions -1); x++)
    		{
    			cout << "*Step " << x+1 << ")" << "  " << aryCurr->instructions[x].instr << "\n";
    		}
    
    		cout << "\n\nPress enter to return to main menu.\n\n\n\n\n\n\n\n";
    		cin >> junk;
    		cin.ignore(INT_MAX,'\n');
    		main();
    		break;
    
    	case 3:
    		char *searchType;
    		searchType = (char*)malloc(31);
    		cout << "\nPlease enter the type of the recipe:\n";
    		cin.ignore(INT_MAX,'\n');
    		cin.getline(searchType, 30);
    		cin.ignore(INT_MAX,'\n');
    		for(x=0;x <= *current;x++)
    		{
    			if (strstr(strupr((aryCurr + x)->type), strupr(searchType)))
    			{
    				listed++;
    				cout << "\n" << listed+1 << ": " << (aryCurr+x)->type << "|" << (aryCurr+x)->name;
    				listedKey[listed] = (aryCurr+x)->id;
    				if(listed > 15)
    				{
    					cout << "\nContinue searching? (Y/N)";
    					cin >> chooser;
    					if (chooser=='y' || chooser =='Y')
    					{
    						listed = 0;
    						cout << "\n\n\n\n\n\n\n\n\n\n";
    					}
    					else
    						break;
    				}
    			}
    		}
    		if (listed ==-1)
    		{
    			cout << "\nNo recipes matched!\n\n\n\n\n\n";
    			main();
    		}
    		cout << "\nType the number of recipe to view\n";
    		while (recipeChoice > (listed+1) || recipeChoice < 1)
    			cin >> recipeChoice;
    		cin.ignore(INT_MAX,'\n');
    		aryCurr += listedKey[recipeChoice-1];
    		cout << "\n\n\nID: " << aryCurr->id;
    		cout << "\nName: " << aryCurr->name;
    		cout << "\nType: " << aryCurr->type;
    		cout << "\nDifficulty: " << aryCurr->difficulty;
    		cout << "\nDate Added: " << aryCurr->dateAdded;
    		cout << "\nPeople Served: " << aryCurr->peopleServed;
    		cout << "\nNumber of ingredients: " << aryCurr->numIngredient;
    		cout << "\nNumber of instructions: " << aryCurr->numInstructions;
    
    		cout << "\n\nPress enter to see the ingredients\n";
    		cin.getline(junk,2);
    
    		cout << "\n\n #   Ingredient\n------------------------------------------------\n";
    		for (x=0; x <= (aryCurr->numIngredient -1); x++)
    		{
    			cout << "[" << aryCurr->ingredients[x].quantity << "]  " << aryCurr->ingredients[x].name << "\n";
    		}
    
    		cout << "\n\nPress enter to see the instructions\n";
    		cin.getline(junk,2);
    
    		cout << "\n\t\tINSTRUCTIONS\n-------------------------------------------------\n";
    
    		for (x=0; x <= (aryCurr->numInstructions -1); x++)
    		{
    			cout << "*Step " << x+1 << ")" << "  " << aryCurr->instructions[x].instr << "\n";
    		}
    
    		cout << "\n\nPress enter to return to main menu.\n\n\n\n\n\n\n\n";
    		cin.ignore(INT_MAX,'\n');
    		cin >> junk;
    		cin.ignore(INT_MAX,'\n');
    		main();
    		break;
    
    	case 4:
    		//int searchDifficulty=-1;
    		cout << "\nPlease type the desired difficulty:\n";
    		while (searchDifficulty < 1 || searchDifficulty > 10)
    			cin >> searchDifficulty;
    		cin.ignore(INT_MAX,'\n');
    
    		for(x=0;x <= *current;x++)
    		{
    			if ((aryCurr+x)->difficulty = searchDifficulty)
    			{
    				listed++;
    				cout << "\n" << listed+1 << ": " << aryCurr->name;
    				listedKey[listed] = (aryCurr+x)->id;
    				if(listed > 15)
    				{
    					cout << "\nContinue searching? (Y/N)";
    					cin >> chooser;
    					if (chooser=='y' || chooser =='Y')
    					{
    						listed = 0;
    						cout << "\n\n\n\n\n\n\n\n\n\n";
    					}
    					else
    						break;
    				}
    			}
    		}
    		if (listed ==-1)
    		{
    			cout << "\nNo recipes matched!\n\n\n\n\n\n";
    			main();
    		}
    		cout << "\nType the number of recipe to view\n";
    		while (recipeChoice > (listed+1) || recipeChoice < 1)
    			cin >> recipeChoice;
    		
    		cin.ignore(INT_MAX,'\n');
    		aryCurr += listedKey[recipeChoice-1];
    		cout << "\n\n\nID: " << aryCurr->id;
    		cout << "\nName: " << aryCurr->name;
    		cout << "\nType: " << aryCurr->type;
    		cout << "\nDifficulty: " << aryCurr->difficulty;
    		cout << "\nDate Added: " << aryCurr->dateAdded;
    		cout << "\nPeople Served: " << aryCurr->peopleServed;
    		cout << "\nNumber of ingredients: " << aryCurr->numIngredient;
    		cout << "\nNumber of instructions: " << aryCurr->numInstructions;
    
    		cout << "\n\nPress enter to see the ingredients\n";
    		cin.getline(junk,2);
    
    		cout << "\n\n #   Ingredient\n------------------------------------------------\n";
    		for (x=0; x <= (aryCurr->numIngredient -1); x++)
    		{
    			cout << "[" << aryCurr->ingredients[x].quantity << "]  " << aryCurr->ingredients[x].name << "\n";
    		}
    
    		cout << "\n\nPress enter to see the instructions\n";
    		cin.getline(junk,2);
    		cout << "\n\t\tINSTRUCTIONS\n-------------------------------------------------\n";
    
    		for (x=0; x <= (aryCurr->numInstructions -1); x++)
    		{
    			cout << "*Step " << x+1 << ")" << "  " << aryCurr->instructions[x].instr << "\n";
    		}
    
    		cout << "\n\nPress enter to return to main menu.\n\n\n\n\n\n\n\n";
    		
    		cin.ignore(INT_MAX,'\n');
    		cin >> junk;
    		cin.ignore(INT_MAX,'\n');
    		main();
    		break;
    	
    	default:
    		main();
    		break;
    	}
    }

    Thanks for the help!
    sirSolarius

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Code:
    #include <iostream.h>
    Wrong

    Code:
    void main()
    Wrong

    Don't call main() recursively.

    Do use descriptive variable names.

    Don't post so much code... narrow it down to the parts that are giving you errors.
    Last edited by confuted; 09-27-2003 at 09:29 PM.
    Away.

  3. #3
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    I don't understand the following:

    Code:
    ptrCurrent = ĄtRecipe;
    What is that symbol, and what is that variable?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,600
    Without reading/compiling the whole thing I can tell you that you have an extra left-brace before:

    >> CoolFile.close();

    Also, don't call main recursively. For one, it's 'taboo' to call main like that, and second, it eats up your program's working 'stack space' (the stack will grow till it reaches it's limit and your program will 'self destruct'). Try this for youself and see:

    Code:
    int main()
    {
     main();
    }
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    27
    Ok guys, thanks for the tips! I changed main to an int, and I retitled the #include statements...

    I'm still getting these weird errors, though... and I know that I shouldn't post so much code, but I just had no idea where the errors were coming from, since I have semi-colons where they should be, etc....

    Also, if I shouldn't call main() recursively, how can I return to the main menu in a different function?

    Thanks!
    sirSolarius

  6. #6
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Put the main menu IN a different function, and call that. Or it could probably be accomplished with a while() loop around the menu, and just calling functions and letting them return. I haven't examined the code closely - because there is a lot of it.
    Away.

  7. #7
    Registered User
    Join Date
    Jul 2003
    Posts
    450
    when the function called ends or is returned execution will continue from where the function was called in main

    haven't really looked at the code but you may want a loop structure in main

    there is so much code the error is reported on line two hundred somthing maybe you could repost just a snippit before where the error is first being reported to a bit after

    Code:
    if (CoolFile)
    	{
    			CoolFile << aryCurr->name << endl;
    			CoolFile << aryCurr->type << endl;
    			CoolFile << aryCurr->difficulty << endl;
    			CoolFile << aryCurr->peopleServed << endl;
    			CoolFile << aryCurr->dateAdded << endl;
    			CoolFile << aryCurr->numIngredient << endl;
    			CoolFile << aryCurr->numInstructions << endl;
    			
    			for (g=0;g <=numberOfIngredients;g++)
    			{
    				CoolFile << aryCurr->ingredients[g].name << endl;
    				CoolFile << aryCurr->ingredients[g].quantity << endl;
    			}
    
    			for (g=0;g <=numberOfInstructions;g++)
    			{
    				CoolFile << aryCurr->instructions[g].instr << endl;
    			}
    			CoolFile.seekp(0);
    			CoolFile << *current << " " << endl;
    		}
    	}
    looks like you have an extra } here
    Last edited by curlious; 09-28-2003 at 10:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. weird errors
    By alexnb185 in forum C Programming
    Replies: 4
    Last Post: 11-22-2007, 09:11 PM
  2. weird errors gcc : functions like floor(), ceil(), sqrt()
    By gemini_shooter in forum C Programming
    Replies: 2
    Last Post: 06-04-2005, 09:00 AM
  3. weird errors gcc: functions like floor(), ceil(), sqrt()
    By gemini_shooter in forum Linux Programming
    Replies: 2
    Last Post: 06-04-2005, 08:39 AM
  4. weird compile errors
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 01-02-2003, 09:51 PM
  5. RAM/Swap Memory Code Errors
    By ghe1 in forum Linux Programming
    Replies: 2
    Last Post: 04-01-2002, 06:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21