Question: I try to validate my code, but i get a few error, and i need help with this:

I get a few error for this:

1. **end tag for "param" omitted, but OMITTAG NO was specified**
2. **cannot generate system identifier for general entity "color"**
3. **general entity "color" not defined and no default entity**

4 **reference not terminated by REFC delimiter**

```
>     > <object
>     > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>     > codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
>     > id="flaMovie" width="400"
>     > height="235">
>     >             <param name="movie" value="swf/test_movie_purple.swf">
>     >             <param name="FlashVars" value="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>">
>     >             <param name="quality" value="medium">
>     >             <param name="wmode" value="transparent">
>     >             <embed src="swf/test_movie_purple.swf"
>     > flashvars="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>" wmode="transparent"
>     > width="400" height="235"
>     > type="application/x-shockwave-flash"></embed></object>

```

Could anyone help me fix this? Im goin' to crazy..

Answer: 
The `extern` storage class for them is almost certainly the cause of the problem you're seeing. If you remove it, the code will probably be fine (at least in this respect).

Edit: I just noticed that you've tagged this as both C and C++. In this respect C and C++ are really quite different (but from the error messages, you're apparently compiling as C++, not C). In C++, you want to remove the `extern`, because (by default) `const` variables have the `static` storage class. That means each source file (translation unit) will get its own "copy" of the variable, and there won't be any conflict between definitions in different files. Since you're (probably) only using the values, not treating them as variables, having multiple "copies" won't hurt anything -- none of them will be allocated storage space.

In C, `extern` is rather different, and removing the `extern` won't make any real difference, because they'll be `extern` by default. In this case, you really need to initialize the variables in exactly one place, and declare them extern in the header. Alternatively, you can add the `static` storage class that C++ will add by default when/if you remove the `extern` from the header.
It looks like that header file is getting included multiple times. You need to add guards.

At the top of each header file you should have something like:

```
#ifndef MY_HEADER_FILE_NAME_H
#define MY_HEADER_FILE_NAME_H

...

// at end of file
#endif

```

If you are using g++ or MSVC then you can just add:

```
#pragma once

```

At the top of each header file, but that isn't 100% portable.

Also, you shouldn't define constants in header files, only declare them:

```
// In header file
extern const int my_const;

// In one source file
const int my_const = 123;

```