may i know is it possible for me to insert this "□" symbol in an array??
actually i was doing an airlines seat reservation system, and normally people will do as follow:
------------------------
char seat[??][??];
for( int r=0; r<??; ++r )
for( int c=0; c<??; ++c )
{
seat[r][c] = 'O';
}
if □ can be represented by a single char depends on the encoding you are using. In ASCII it's not possible. It might be possible if you use std::string instead of a single char but that also depends on the encoding.
When using the console, you're restricted to one character set. First half is ASCII, the second half may vary. It is probably going to be http://en.wikipedia.org/wiki/Code_page_437
How about 254?
wchar_t seat[R][C];
for( int r=0; r<R; ++r )
for( int c=0; c<C; ++c )
seat[r][c] = L'□';
full demo with console output : http://ideone.com/SCxNn
(tested using Visual Studio 2010 on Windows and using gcc on Linux. Neither is restricted to ASCII)