|
-
January 21st, 2009, 08:28 PM
#1
test
The colour coding is done by msvc not me
This is exactly how it pastes from msvc9 and I swear it doesn't look like that in the compiler.
Code pasted from msvc7.0
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_;
}
static void 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
Same code pasted from msvc9 express.
Code:
#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_;
}
static void 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
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
-
January 21st, 2009, 08:29 PM
#2
Re: test
The colour coding is done by msvc not me
This is exactly how it pastes from msvc9 and I swear it doesn't look like that in the compiler.
Code pasted from msvc7.0
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_;
}
static void 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
Same code pasted from msvc9 express.
Code:
#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_;
}
static void 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
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
-
January 21st, 2009, 08:37 PM
#3
Re: test
#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
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
-
January 21st, 2009, 08:38 PM
#4
Re: test
#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_;
}
static void 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
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
-
January 21st, 2009, 08:39 PM
#5
Re: test
#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_;
}
static void 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
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
-
January 21st, 2009, 09:54 PM
#6
Re: test
And yes, that is English for the UK'er, Aussies and Canadian not American 
Next time of use, please be careful with the language
-
January 21st, 2009, 10:10 PM
#7
Re: test
 Originally Posted by Marie Mih
And yes, that is English for the UK'er, Aussies and Canadian not American 
Next time of use, please be careful with the language 
I don't know about Brad, I guess Brad is an Australian Canadian man living in Ilionois
Marie - Superstar, you so hillarious
-
January 22nd, 2009, 09:57 AM
#8
Re: test
And this is what happens when you cut and paste someone else's post and put your own name on it.....
(and I'm in Indiana, not Illinois )
-----------------------------------------------
Brad! Jones,
Yowza Publishing
LotsOfSoftware, LLC
-----------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|