I use Borland aswell (i like it personally) as for the compiler it is just the play button (labeled as run) and when you say you click on the icon and it dissapears right away, are you talking about the Borland program itself, or the program you are trying to run? if it is the program it is because the computer is executing the program then seeing that there is nothing else to do closes itself. if you #include <conio> you can use the getch(); command at the end of your program which will keep the window open until you press anykey then it will close.
I say djgpp is way better than Borland. Frist of all, djgpp is a Gnu software. Secondly, you can use much more memory than in Borland's compiler. In the end, in most of the competitions the djgpp is the default compiler.
BTW, why are you people using halfly C and halfly C++?
Why do you use cin and cout and normal pointers? You see, cin and cout are much slower than scanf() and printf(), and when you have to input/output more than 10k of data, you see the difference. That is why I use scanf() and printf(). Normal pointers aren't used much in C++ because there is a templated conatiner vector that you can use to easily manipulate arrays.
Elina:
#include <algorithm>
#include <cstdio>
#include <ctime>
#include <string>
#include <vector>
using namespace std;
const int NULA = 0;
vector< string > names;
template< typename _T > inline void shuffle( _T begining, _T ending ) {
int size = ending - begining;
for( _T it = begining; it < ending; ++it )
swap( *(it), *(begining + (int)rand % size ) );
}
int main( void ) {
int n;
char buff[256];
srand( (unsigned)time( 0 ) );
scanf( "%d", &n );
names.reserve( n );
for( int i = 0; i < n; ++i ) {
scanf( "\n%[^\n]s", buff );
names.push_back( buff );
}
shuffle( names.begin(), names.end() );
for( int i = 0; i < n; ++i )
printf( "%s\n", names[i].c_str() );
return NULA;
}