Prob

This is a discussion on Prob within the C++ Programming forums, part of the General Programming Boards category; any one have any clue y this gives me the error C:\Documents and Settings\Alli-Poo\My Documents\Visual Studio Projects\C++\FFEC.cpp(973) : warning C4551: ...

  1. #1
    Registered User Ajsan's Avatar
    Join Date
    Dec 2003
    Posts
    55

    Prob

    any one have any clue y this gives me the error

    C:\Documents and Settings\Alli-Poo\My Documents\Visual Studio Projects\C++\FFEC.cpp(973) : warning C4551: function call missing argument list

    Code:
    struct Weapon
    {
    	string Name,Fname;
    	int DamMin,DamRange;
    };
    struct Room
    {
    	string Exits[10],Item[5][3],Exit;
    	int EncLvl,Quest,EncChance;
    	bool Merchant;
    };
    struct Armor
    {
    	string Name,Fname;
    	int AC,LimitMod;
    };
    struct Amulet
    {
    	string Name,Fname;
    	int ModType, ModPower;
    };
    struct Enemy
    {
    	string Name;
    	int HP,MaxHP,MaxMP,MP,DamMin,DamRange,Magik[22],Magic[22],Inti,Mag;
    };
    struct Player
    {
    	double Dodge,Spell,Attack;
    	string Fname,Lname,Inventory[100][3],Class;
    	int MaxHP,HP,MaxMP,MP,Magik[22],Stats[5],Mods[5],Exp,Quest,InventPlace,Limit,Limits[10],Level,Save,Invent[100],Gold;
    	Weapon Wep;
    	Amulet Ammy;
    	Armor Armour;
    };
    struct Game
    {
    	string Path;
    	bool AutoSave;
    	Room Croom;
    	Player Cplayer;
    	Enemy Cenemy[3];
    };
    int main()
    {
    	string a;
    	ifstream fin;
    	Sleep(3000);
    	Game Info;  // it says the the error is on this line <---
    	clrscr();
    	cout<<"Final Fantasy: Enigma Chronicles\n\n\n";
    	cin>>a;
    	while (a!="quit")
    	{
    		if (a=="instructions")
    			Instructions();
    		else if (a=="new")
    		{
    			cin>>a;
    			NewGame(Info,fin);
    		}
    		else if (a=="load")
    		{
    			cin>>a;
    			LoadGame(Info,fin);
    		}
    		else if (a=="quit")
    			return 0;
    		else
    			cout<<"What?"<<endl;
    	}
    	return 0;
    }
    all of the functions in there are defined and so are all of the functions that are inside of those.

    i'm using VC6.0 Pro and Vis Studio .net 2003

    thx for the help in advance.
    Style is overrated.

    - ₽ -

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    127
    Could you please post the function prototypes and definitions for Instructions, NewGame and LoadGame?

  3. #3
    Registered User Ajsan's Avatar
    Join Date
    Dec 2003
    Posts
    55

    Code

    there is alot of code to post so just click below to veiw

    CODE

    when i compile a actually get 14 errors and 1 warning but i'm pretty sure once i fix the error it will remove the others.
    Style is overrated.

    - ₽ -

  4. #4
    Registered User
    Join Date
    May 2004
    Posts
    127
    You have a structure called Game and a function called Game. Because C++ doesn't require the keyword struct before structure types, your compiler is getting confused about which of them you wanted. Either change the namy of the Game type, or the name of the Game function and your errors will go away.

  5. #5
    Registered User Ajsan's Avatar
    Join Date
    Dec 2003
    Posts
    55

    Love

    I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


    ohhh and thx.
    Style is overrated.

    - ₽ -

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Deal or No Deal listbox prob
    By kryptkat in forum Windows Programming
    Replies: 5
    Last Post: 03-30-2009, 06:53 PM
  2. wierd fopen prob
    By winterflood_j in forum C Programming
    Replies: 10
    Last Post: 02-24-2004, 05:31 AM
  3. prob function call
    By mouse163 in forum C++ Programming
    Replies: 4
    Last Post: 12-18-2002, 11:16 AM
  4. if-else prob..very basic so sorry to trouble u guys
    By bugeye in forum C Programming
    Replies: 2
    Last Post: 01-26-2002, 07:55 AM
  5. prob with fopen
    By ukcpaul in forum C Programming
    Replies: 2
    Last Post: 01-09-2002, 07:23 AM

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