Not likely. There is a difference between std::endl and \n.
(To the OP: The following explanation may not suited for you. The answer of your question was well given in the posts above)
To understand lets see what happens you do a cout.
When you issue a std::cout statement, the data you passed is stored in the stream buffer and is displayed only when there is appropriate time and space to do so. Displaying the stream buffer on to the standard output is proceeded flushing the buffer stream(that is to empty the stream). Once the data has been sent to the standard output, the stream is automatically flushed. Alternatively, you can force a stream flush by using the .flush() member function.
'\n' is a escape sequence but std::endl is a stream manipulator. When you issue a std::endl, it does two jobs
Prints a new line and
Forces the stream to standard output and flushes the stream.
Hence, when you use std::endl, you are sure that it would print the result to the output device immediately.