But I try this at linux (because acm compile it at linux right?)
But it didn't work
Why?
Can some one give me the skeleton that I can used on linux
Thank you
With the ANSI C++ standard, the concept of namespaces was introduced. Roughly speaking, global identifiers can belong to a certain namespace, so you can have different global functions/variables with the same identifier, but within different namespaces (this is rather needed when working on a project with several developers, for acm problems there's no need to define your own namespaces). When "using namespace MySpace", you can directly use the identifiers from MySpace, otherwise you'd have to address them like "MySpace::Variable1".
According to the ANSI C++ standard, all elements of the C++ Library are defined in the namespace std. So when using these function, you either got to refer to that namespace via "using namespace std" or put the namespace in front of each element you're using like "std::cout << std::endl;".
Some C++ Compilers are now refering to the namespace std on default (like rickyoks "BC 3.1 Windows") where you can just use the functions without doing "using namespace std" by yourself, with other compilers, you got do one of the above mentioned methods to address the C++ Library functions correcty (I guess that's the correct way according to the standard, but since most times you're using std anyway, there's no need to state that in some compilers explicitely).
Well, you should be able to read more about namespaces in any decent C++ reference.
C++ has no equivalents to gotoxy() or clrscr(). In fact, C doesn't either, technically, those functions are compiler-specific.
Now, as for compiler-specific, if you're on Linux check out the ncurses library. If you're going for Win32, start with looking up AllocConsole(). If you're on anything else, you might be able to use ANSI escape/color codes.