Code:
#ifndef SEQUENCE_H
#define SEQUENCE_H
#include<algorithm>
#include<ctime>
#include<cstdlib>
#include<cstdio>
#include"typedefs.h"
namespace GT
{
template < uint N >
class Sequence
{
private:
IntVec sequence_;
Sequence( const Sequence& ); 
Sequence& operator =( const Sequence& );
public:
Sequence()
{
sequence_.reserve( N );
for ( int i = 1; i <= N; ++i )
{
sequence_.push_back( i );
}
Shuffle();
}
 
const IntVec& GetSequence() const
{
return sequence_;
}
staticvoid Randomize( uint def = 0 )
{
if ( def == 0 )
def = static_cast<uint>( std::time( NULL ) );
std::srand( def );
}
 
void Shuffle()
{
std::random_shuffle( sequence_.begin(), sequence_.end() );
}
};
} // end namespace
#endif// header guard
The above was pasted from msvc9 express. As you can see this destroys all indentation and even sometimes joins keywords together losing the space between them. What can i do? Others who use msvc9 dont seem to have this problem. I have already told it to use spaces rather than tabs as in all previous versions of msvc I have used. The syntax colouring is nice, but not at the expanse of destroying structure!
Anyone know the fix for this issue??
Also it appears this text is green as the last line of code is a comment. Very strange behaviour.