Jump to content


Reading a textfile

c++

22 replies to this topic

#1 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 20 March 2013 - 06:38 PM

I'm trying to implement a settings file and have the program get the variables from that file. The file looks like this:

UIx1: 0
UIy1: 0
UIx2: 0
UIy2: 0
Bullet Delay: 20
First level: 1

And the piece of code that retrieves the data:
settingsfile = fopen( "settings.txt", "r" );
if (settingsfile != NULL)
{
  fscanf( settingsfile, "UIx1: %i UIy1: %i UIx2: %i UIy2: %i Bullet Delay: %i First level: %i", &UIx1, &UIy1, &UIx2, &UIy2, &bulletDelay, &startlevel );

  fclose( settingsfile);

}
else
{
  printf("Could not open the file.\n");
}

But isn't there a simpler, better readable way to get that information, with a few settings extra that code is going to look (even more) awful.

#2 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 345 posts

Posted 20 March 2013 - 11:06 PM

Okay this will be a little longer post, but whatever...

I put some code for you together, I tried to keep it simple and I'm sure you'll find ways how to extend this idea (which actually work in lots of projects, not just mine).

So here is the source code, I commented it so it should be understandable, if you want explain some part more detailly, please ask :):

#include <iostream>
#include <string>
#include <fstream>
#include <map>
#include <algorithm>
using namespace std;
///////////////////////////////////////////////////
/** Section 1: Procedures to get easier parsing **/
#define OPTION_SEPARATOR '='		// Option separator, you can use ':' also
/** Option types **/
enum optionType
{
	OPT_INT,			// Integer number
	OPT_FLOAT,			// Floating point number
	OPT_INVALID			// Invalid option type (F.e. string, you can extend this further though)
};
/** Option structure **/
struct option
{
	optionType type;		// Option type
	void* data;				// Option value (it's just pointer to where data are stored, you *need* this if you want support different
							// data types like int, string, float, etc. - because they can differ in actual size in bytes)
	/* Constructor for integers */
	// I used constructor here, it could've been another procedure, but I think it's simplier this way
	option(int value)
	{
		type = OPT_INT;
		data = (int*)malloc(sizeof(int));
		*(int*)data = value;
	}
  
	/* Constructor for floats */
	option(float value)
	{
		type = OPT_FLOAT;
		data = (float*)malloc(sizeof(float));
		*(float*)data = value;
	}
	/* Destructor */
	~option()
	{
		free(data);
	}
};
/** Procedure to trim whitespaces out of our line **/
void trimString(string& line)
{
	string::iterator endPos = std::remove(line.begin(), line.end(), ' ');
	line.erase(endPos, line.end());
}
/** Procedure to match line to pattern <name> = <value> **/
bool matchOption(const string& line)
{
	unsigned int sep = line.find(OPTION_SEPARATOR);
	return (sep > 0) && (line.length() > 3);
}
/** Get varable name as separate string **/
string getName(const string& line)
{
	return line.substr(0, line.find(OPTION_SEPARATOR));
}
/** Get variable value as separate string **/
string getValue(const string& line)
{
	return line.substr(line.find(OPTION_SEPARATOR) + 1);
}
/** Get value type **/
optionType getValueType(const string& value)
{
	// Check whether we got decimal point in string
	unsigned int sep = value.find('.');
	// If we don't it's an integer
	if(sep == string::npos)
	{
		// Loop through all numbers, if you find something that is not number, return that option is invalid
		// note that we allow negative numbers here
		for(unsigned int i = 0; i < value.length(); i++)
		{
			if(i == 0 && value[i] == '-')
			{
				continue;
			}
			if(!isdigit((int)value[i]))
			{
				return OPT_INVALID;
			}
		}
		return OPT_INT;
	}
	// Otherwise it's a float
	else
	{
		// Loop through all numbers like for integers, note that we have to search also fractional part separately
		for(unsigned int i = 0; i < sep; i++)
		{
			if(i == 0 && value[i] == '-')
			{
				continue;
			}
			if(!isdigit((int)value[i]))
			{
				return OPT_INVALID;
			}
		}
		for(unsigned int i = sep + 1; i < value.length(); i++)
		{
			if(!isdigit((int)value[i]))
			{
				return OPT_INVALID;
			}
		}
		return OPT_FLOAT;
	}
}
/////////////////////////////////
/** Section 2: Option storage **/
/** Map that holds option names connected with actual option values (containing option value type and option actual value) **/
map<string, option*> options;
/**
  * A slight note to next 2 procedures. You give it option name and gets value back. The thing is I'm not testing
  * value type correctness here, but as you actually store value type, you can test it here (and throw exception,
  * or printf out some info to user here)
  **/
/** Procedure to get integer value of option **/
int getOptionIntValue(const string& opt)
{
	map<string, option*>::iterator it = options.find(opt);
	return *(int*)it->second->data;
}
/** Procedure to get float value of option **/
float getOptionFloatValue(const string& opt)
{
	map<string, option*>::iterator it = options.find(opt);
	return *(float*)it->second->data;
}
//////////////////////////////////////////////
/** Section 3: Automata & test application **/
/** Entry point @main **/
int main()
{
	// Open file
	ifstream file;
	file.open("../Config.txt");
	// Read through all lines
	while(file.eof() == false)
	{
		// Read single line
		string line;
		getline(file, line);
		// Get rid of whitespaces
		trimString(line);
		// If we don't have option on current line (e.g. it doesn't matches pattern <name> = <value>), continue with next line
		bool optionPresent = matchOption(line);
		if(!optionPresent)
		{
			continue;
		}
	  
		// Get name & value as separate strings
		string varName = getName(line);
		string varValue = getValue(line);
		// Get value type
		optionType varType = getValueType(varValue);
		// Depending on value type
		switch(varType)
		{
		// Integer
		case OPT_INT:
			{
				// Parse integer & store option
				int value = atoi(varValue.c_str());
				options[varName] = new option(value);
			}
			break;
		// Float
		case OPT_FLOAT:
			{
				// Parse float & store option
				float value = (float)atof(varValue.c_str());
				options[varName] = new option(value);
			}
			break;
		// Invalid value type
		case OPT_INVALID:
			// You can throw exception, print something, ... - you actually should
			break;
		}
	}
	// Close the file
	file.close();
  
	// Print out some variables - to show you how you can search for them
	cout << "otherFloat value is " << getOptionFloatValue("otherFloat") << endl;
	cout << "negativeFloat value is " << getOptionFloatValue("negativeFloat") << endl;
	cout << "anotherInt value is " << getOptionIntValue("anotherInt") << endl;
	cout << "someInteger value is " << getOptionIntValue("someInteger") << endl;
	// Keep console running
	cin.get();
	// Voila
	return 0;
}

My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#3 TheNut

    Senior Member

  • Moderators
  • 1701 posts
  • LocationCyberspace

Posted 21 March 2013 - 03:33 AM

Hi TTTNL,

You want to look into formats that have a well defined structure, such as JSON or XML. For JSON, take a look at jsoncpp. For XML, take a look at expat. Both these formats are very important and widely used in the industry, so it's good to start working with them. Alternatively, you can look into binary serialization. This is perhaps the most easiest solution, but it has many drawbacks such as backwards compatibility. It's mostly used when speed is desired above all else because you're just dumping the binary data stored in memory directly to disk and reloading it back as-is. A more robust serializer allows you to import and export with other formats like XML and JSON. The libraries I posted above require you to manually map the data from your source to your objects, but this sort of system is dynamic. You can import from any file type while the underlying serilizer performs the necessary mapping for you. It's a bit of an advanced topic, but something for you to think about when you need to start working with more powerful systems. For the time being, learning about the aforementioned formats and their popular libraries should be your starting point.
http://www.nutty.ca - Being a nut has its advantages.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 21 March 2013 - 05:22 AM

I guess I'll throw my hat into the ring here too... :)

Vilem and Nut have suggested pretty generalized solutions that are capable of handling a lot of stuff, such as arbitrary settings whose names you need not know at compile time, and hierarchical data where you can have groups, settings with sub-settings, lists and suchlike. That's handy to know about, but supposing you don't want to do that much work and don't need that level of generality, you can also write a much simpler parser that's specialized for the settings you have. That doesn't take too much code. Here's something to get you started:

void parse_settings()
{
	FILE * file = fopen("settings.txt", "rt");
	if (!file)
	{
		printf("Could not open the settings file.\n");
		return;
	}

	int iLine = 0;
	char line[1024];

	// Loop until the end of file (EOF)
	while (!feof(file))
	{
		// Read a line from the file (must be less than 1024 characters)
		fgets(line, 1024, file);
		++iLine;					// Keep track of line number, for error messages

		// Allow comments starting with '#'
		if (char * comment = strchr(line, '#'))
		{
			// Replace the # with a null, effectively cutting the comment off.
			*comment = 0;
		}

		// Find the beginning of the setting name, allowing whitespace
		char * settingName = line + strspn(line, " \t");

		// Skip blank lines
		if (*settingName == 0)
			continue;

		// Find the end of the setting name, signaled by whitespace or ':'
		// Note: this means setting names cannot have spaces in them
		char * settingNameEnd = settingName + strcspn(settingName, " \t:");

		// Find the beginning and end of the value
		char * settingValue = settingNameEnd + strspn(settingNameEnd, " \t:");
		char * settingValueEnd = settingValue + strcspn(settingValue, " \t");

		// Error if we don't have a value
		if (*settingNameEnd == 0 || *settingValue == 0)
		{
			printf("Syntax error on line %d of settings file.\n", iLine);
			continue;
		}

		// Put nulls after the name and value, so we'll have exactly the strings we want.
		*settingNameEnd = 0;
		*settingValueEnd = 0;

		// Check the name of the setting and parse the value appropriately
		if (stricmp(settingName, "UIx1") == 0)
			UIx1 = atoi(settingValue);
		else if (stricmp(settingName, "UIy1") == 0)
			UIy1 = atoi(settingValue);
		else if (stricmp(settingName, "UIx2") == 0)
			UIx2 = atoi(settingValue);
		else if (stricmp(settingName, "UIy2") == 0)
			UIy2 = atoi(settingValue);
		else if (stricmp(settingName, "bulletDelay") == 0)
			bulletDelay = atoi(settingValue);
		else if (stricmp(settingName, "startlevel") == 0)
			startlevel = atoi(settingValue);
		else
			printf("Unknown setting \"%s\" on line %d of settings file.\n", settingName, iLine);
	}
}

reedbeta.com - developer blog, OpenGL demos, and other projects

#5 Stainless

    Member

  • Members
  • PipPipPipPip
  • 582 posts
  • LocationSouthampton

Posted 21 March 2013 - 11:06 AM

I know it has become accepted that having text files in a game is "a good thing", but I am completely against it.

The issues for me are three fold

1) Storage : it takes a LOT more disk space to store text files instead of binary data, especially if you use #spit XML
2) Load time : it takes a LOT more run time to parse text instead of reading binary data
3) Security : it's a LOT easier for end users to understand and change settings in a text file.

You may not care about any of these, but I do. I just had to port a game which used xml for all it's levels. On a Samsung Galaxy SIII, a reasonably powerful device, it took 42 seconds to load a level. Unacceptable. I compiled the levels into binary and a level now loads in 475ms

As I say, it's your choice...

#6 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1590 posts

Posted 21 March 2013 - 01:02 PM

Apart from all that, which was actually pretty interesting, it's important to group data. The more you can put things into an array, the easier it is to handle, store and retrieve.
Currently using Blender and Unity.

#7 Sol_HSA

    Senior Member

  • Members
  • PipPipPipPip
  • 510 posts
  • LocationNowhere whenever

Posted 21 March 2013 - 01:12 PM

And since nobody else mentioned it, I strongly recommend against using fscanf. It's error-prone, security risk, and has portability issues.
http://iki.fi/sol - my schtuphh

#8 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 345 posts

Posted 21 March 2013 - 01:14 PM

#Stainless - I definitely didn't mean to store data in configuration files (I do store them in binary format, that's easily readable)! The next points are reaction on points assuming that we store just configurations in config files, not the data (thats insane of course).

1.) Storage - configuration files are quite small, the biggest one I used had less than few kilobytes (i think like 3 or 4 kB), you should only use them for configuration (window size, renderer settings, volume, installation path, data path, user configs, etc.) - as writing "3.141592" - e.g. 8 characters (8 bytes) is a lot worse than writing 0xd8 0x0f 0x49 0x40 - e.g. 4 characters. Of course parsing... this brings me to...

2.) Load time - as configuration files are small it isn't a big problem. Again if you thought using them for data, then of course it's a big problem. Also parsing "3.141592" takes quite a lot of time (reading number as 3141592 and then dividing by 1e6 takes quite a lot of time) as opposing to 0x40490fd8 - which we can read to float directly using fread. This brings me to...

3.) Security - You sometimes want user to change configuration settings, and thats why we keep them in text (instead of binary). Of course storing data in text mode is serious security risk (you can encrypt the text, but basically this even longers load time).
On linux we don't allow user to change configurations unless he has rights for it (and when he has rights, he should know what he is doing). Thats problem on Windows OS though. So the problem ends more like, decide what you want to keep in configuration file (and thus expose to the user).

F.e. storing parameters like window's dimensions is good thing to store, parameters like gamma, brightness contrast also, parameters like installation directory and paths to resources also (no don't even mention registry! just don't! I'm a linux guy) also ... storing parameters like where are enemies in map, where are models in map are definitely NOT a good thing to store in text files (and also not a good thing to expose to users).

#Sol_HSA - basically also fgets isn't a best way to read a line (what about lines larger than your max line size - you have to check whether you actually read whole line (ending with \n), or whether you need to reallocate target buffer and read more).
the best way to read file line-by-line is to read it WHOLE into memory and operate in there ... but you must guarantee that your memory is large enough to read whole file (which isn't problem for configuration files). Though I remember reading power plant model in this way, recieving very nice error "Out of memory" on 16 GB RAM machine :D - after all those years I haven't seen this error, it really got me laughing. :ph34r:
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#9 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 21 March 2013 - 02:15 PM

My game is nothing serious or advanced. It's just a small assignment for a school and it would be preferable for users to change the settings just to show off i've implemeted the possibility. Vilem Otte's way is a bit to advanced for me, I've only been programming C++ for a few months while still in my exam year of highschool, and a bit over the top for it's usage. But i might come back to it when i'm a bit more advanced :). I will look into Reedbeta's way since it's textfile based and better understandable for me. But thanks everyone for showing your input!

#10 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 22 March 2013 - 09:14 PM

It works, thanks everyone! Also the possibility to add coments is very useful.

Next problem:
I have defined some integers in a .h file for the creation of an array of objects:

classes.h
const int enemies = 10;

class enemyBubble
{
   //
};
extern enemyBubble enemy[enemies];

Is it considered good programming to do it this way? And how can i make it possible so the game gets these variables from a textfile? I think that's going to be the last thing i want to add so i can start making my code more readable, add some comments, send it in and await my trial! Excited :D

#11 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 22 March 2013 - 09:19 PM

If you only need a static number of enemies, that way is fine. If you want a dynamic number of enemies, you can use an std::vector, and use resize() on it to set it to the desired size after you've read the settings file.
reedbeta.com - developer blog, OpenGL demos, and other projects

#12 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 22 March 2013 - 10:31 PM

View PostReedbeta, on 22 March 2013 - 09:19 PM, said:

If you only need a static number of enemies, that way is fine. If you want a dynamic number of enemies, you can use an std::vector, and use resize() on it to set it to the desired size after you've read the settings file.
It's static, but where do i put the code that gets the settings from the file, i can't put it in the .h file as far as i know, it says something like "expected a declaration".

#13 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 22 March 2013 - 10:48 PM

Sorry, by "static" I mean "known at compile-time". If you don't know how many enemies there are until the program starts up and reads the settings, that's "dynamic" - even though the number is only changed once in the program's execution. You should still use an std::vector for that, even if you're not going to be adding and removing enemies as the game is played.
reedbeta.com - developer blog, OpenGL demos, and other projects

#14 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1590 posts

Posted 22 March 2013 - 11:50 PM

Quote

Is it considered good programming to do it this way? And how can i make it possible so the game gets these variables from a textfile?

I'm a little rusty on c++, but normally you match a header file with a class in a cpp where you declare the things you prototyped in the header. If the class is public or protected, then the other classes can access the information. You would probably include the reading of the text file in that class and have getters and setters to access the information, so in your main you would just instantiate that class, where you have it declare variables in the constructor, and have it read in the information first thing or when chosen from a menu. Then access it when things change, and save when it is called from a menu or whatever. Depending on the size of the program, you could also just declare variables in the main and use a function for reading and writing text.
Currently using Blender and Unity.

#15 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 23 March 2013 - 11:36 AM

View PostReedbeta, on 22 March 2013 - 10:48 PM, said:

Sorry, by "static" I mean "known at compile-time". If you don't know how many enemies there are until the program starts up and reads the settings, that's "dynamic" - even though the number is only changed once in the program's execution. You should still use an std::vector for that, even if you're not going to be adding and removing enemies as the game is played.
But i have a lot of for loops in my program that loops through the array of bullets/enemies/healthpickups etc. like enemy[i]. How can i make the objects in a vector but still use my for loops on the objects? Or any other vector method so one method/if statements/variable definition applies to all of the bullets/enemies etc.

#16 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 23 March 2013 - 04:23 PM

You can get the number of items in a vector using size() and use that to loop over it, like this:

for (int i = 0; i < enemy.size(); ++i)
{
    // Do stuff with enemy[i]...
}

The individual enemy objects can be accessed with enemy[i], just like an array.
reedbeta.com - developer blog, OpenGL demos, and other projects

#17 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 23 March 2013 - 09:34 PM

Where do i define/prototype the vector? In my classes.h, classes.cpp or game.cpp? If i define it in game.cpp then my functions in classes.cpp generate an error at bullets.size(). Because they don't know what "bullets" is

My best guess is:

classes.h:
extern std::vector<bulletBubble> bullets(10);

classes.cpp:
std::vector<bulletBubble> bullets(10);

But this raises the next problem (and seems to be the only left):
Where do i put "#include <vector>"? As far as i know it can only been included in one file, but every combination i tried generates an error.

#18 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 23 March 2013 - 10:41 PM

Almost right.

classes.h:
#include <vector>
extern std::vector<bulletBubble> bullets;

classes.cpp
std::vector<bulletBubble> bullets(10);

It doesn't matter if you #include <vector> more than once; it's designed to be able to deal with that.
reedbeta.com - developer blog, OpenGL demos, and other projects

#19 TTTNL

    Member

  • Members
  • PipPip
  • 48 posts

Posted 23 March 2013 - 11:27 PM

Nope, not working, this is my debug output:
1>------ Build started: Project: Bubbleshooter, Configuration: Debug Win32 ------
1>Build started 24-3-2013 00:24:02.
1>InitializeBuildStatus:
1>  Touching "Debug\Bubbleshooter.unsuccessfulbuild".
1>ClCompile:
1>  classes.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(63): error C2146: syntax error : missing ';' before identifier '_mm_addsub_ps'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(63): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(63): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(64): error C2146: syntax error : missing ';' before identifier '_mm_hadd_ps'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(64): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(64): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(65): error C2146: syntax error : missing ';' before identifier '_mm_hsub_ps'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(65): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(65): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(65): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(65): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(66): error C2146: syntax error : missing ';' before identifier '_mm_movehdup_ps'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(66): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(66): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(67): error C2146: syntax error : missing ';' before identifier '_mm_moveldup_ps'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(67): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(67): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(73): error C2146: syntax error : missing ';' before identifier '_mm_addsub_pd'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(73): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(73): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(73): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(73): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(74): error C2146: syntax error : missing ';' before identifier '_mm_hadd_pd'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(74): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(74): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(75): error C2146: syntax error : missing ';' before identifier '_mm_hsub_pd'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(75): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(75): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(75): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(75): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(76): error C2146: syntax error : missing ';' before identifier '_mm_loaddup_pd'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(76): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(76): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(76): warning C4391: 'int _mm_loaddup_pd(const double *)' : incorrect return type for intrinsic function, expected 'struct'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(77): error C2146: syntax error : missing ';' before identifier '_mm_movedup_pd'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(77): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(77): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(77): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(77): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(82): error C2146: syntax error : missing ';' before identifier '_mm_lddqu_si128'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(82): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(82): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(82): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\pmmintrin.h(82): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(36): error C2146: syntax error : missing ';' before identifier '_mm_hadd_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(36): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(36): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(37): error C2146: syntax error : missing ';' before identifier '_mm_hadd_epi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(37): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(37): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(37): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(37): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(38): error C2146: syntax error : missing ';' before identifier '_mm_hadds_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(38): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(38): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(38): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(38): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(40): error C2146: syntax error : missing ';' before identifier '_mm_hadd_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(40): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(40): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(40): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(40): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(41): error C2146: syntax error : missing ';' before identifier '_mm_hadd_pi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(41): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(41): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(41): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(41): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(42): error C2146: syntax error : missing ';' before identifier '_mm_hadds_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(42): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(42): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(42): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(42): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(47): error C2146: syntax error : missing ';' before identifier '_mm_hsub_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(47): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(47): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(47): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(47): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(48): error C2146: syntax error : missing ';' before identifier '_mm_hsub_epi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(48): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(48): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(48): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(48): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(49): error C2146: syntax error : missing ';' before identifier '_mm_hsubs_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(49): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(49): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(51): error C2146: syntax error : missing ';' before identifier '_mm_hsub_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(51): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(51): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(51): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(51): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(52): error C2146: syntax error : missing ';' before identifier '_mm_hsub_pi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(52): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(52): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(53): error C2146: syntax error : missing ';' before identifier '_mm_hsubs_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(53): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(53): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(58): error C2146: syntax error : missing ';' before identifier '_mm_maddubs_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(58): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(58): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(58): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(58): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(60): error C2146: syntax error : missing ';' before identifier '_mm_maddubs_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(60): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(60): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(60): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(60): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(65): error C2146: syntax error : missing ';' before identifier '_mm_mulhrs_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(65): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(65): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(65): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(65): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(67): error C2146: syntax error : missing ';' before identifier '_mm_mulhrs_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(67): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(67): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(72): error C2146: syntax error : missing ';' before identifier '_mm_shuffle_epi8'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(72): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(72): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(74): error C2146: syntax error : missing ';' before identifier '_mm_shuffle_pi8'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(74): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(74): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(79): error C2146: syntax error : missing ';' before identifier '_mm_sign_epi8'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(79): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(79): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(80): error C2146: syntax error : missing ';' before identifier '_mm_sign_epi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(80): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(80): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(81): error C2146: syntax error : missing ';' before identifier '_mm_sign_epi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(81): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(81): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(81): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(81): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(83): error C2146: syntax error : missing ';' before identifier '_mm_sign_pi8'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(83): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(83): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(83): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(83): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(84): error C2146: syntax error : missing ';' before identifier '_mm_sign_pi16'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(84): error C2146: syntax error : missing ')' before identifier 'a'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(84): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(85): error C2146: syntax error : missing ';' before identifier '_mm_sign_pi32'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\tmmintrin.h(85): fatal error C1003: error count exceeds 100; stopping compilation
1>  game.cpp
1>d:\template\bubble shooter - 23-03-2013\classes.h(15): error C2065: 'bulletBubble' : undeclared identifier
1>d:\template\bubble shooter - 23-03-2013\game.cpp(136): warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(215): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(215): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(244): error C2662: 'std::vector<_Ty,_Ax>::size' : cannot convert 'this' pointer from 'std::vector' to 'const std::vector<_Ty,_Ax> &'
1>		  Reason: cannot convert from 'std::vector' to 'const std::vector<_Ty,_Ax>'
1>		  Conversion requires a second user-defined-conversion operator or constructor
1>d:\template\bubble shooter - 23-03-2013\game.cpp(246): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(246): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(248): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(248): error C2228: left of '.spawn' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(250): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(250): error C2228: left of '.getUnitLenght' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(300): error C2662: 'std::vector<_Ty,_Ax>::size' : cannot convert 'this' pointer from 'std::vector' to 'const std::vector<_Ty,_Ax> &'
1>		  Reason: cannot convert from 'std::vector' to 'const std::vector<_Ty,_Ax>'
1>		  Conversion requires a second user-defined-conversion operator or constructor
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(302): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(304): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(304): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(306): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(306): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(308): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(308): error C2228: left of '.move' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(312): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(312): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(314): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(320): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(320): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(329): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(333): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(333): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(340): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(344): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(344): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(349): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(353): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(353): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2228: left of '.x' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2228: left of '.y' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(358): error C2228: left of '.rad' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(361): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(361): error C2228: left of '.active' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(365): error C2678: binary '[' : no operator found which takes a left-hand operand of type 'std::vector' (or there is no acceptable conversion)
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(911): could be 'vector<_Ty,_Ax>::_Alloc::const_reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type) const'
1>		  c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(927): or	   'vector<_Ty,_Ax>::_Alloc::reference std::vector<_Ty,_Ax>::operator [](vector<_Ty,_Ax>::_Alloc::size_type)'
1>		  while trying to match the argument list '(std::vector, int)'
1>d:\template\bubble shooter - 23-03-2013\game.cpp(365): error C2228: left of '.draw' must have class/struct/union
1>d:\template\bubble shooter - 23-03-2013\game.cpp(402): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(415): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(439): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(462): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(473): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(473): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(482): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(482): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(490): warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(490): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(629): warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(630): warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(632): warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(633): warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(635): warning C4244: 'initializing' : conversion from 'int' to 'float', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(637): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(640): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(663): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(677): warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(678): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(683): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(701): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>d:\template\bubble shooter - 23-03-2013\game.cpp(709): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.44
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


#20 Reedbeta

    DevMaster Staff

  • Administrators
  • 5309 posts
  • LocationSanta Clara, CA

Posted 24 March 2013 - 02:28 AM

d:\template\bubble shooter - 23-03-2013\classes.h(15): error C2065: 'bulletBubble' : undeclared identifier

The declaration of the vector needs to go after the definition of the bulletBubble class.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users