Mostly I see people using \n at the end of string but putting \n at the beginning makes more sense to me since now I don't have to keep track of what will be printed next.
For example-
std::cout<<"Some string\n"; //syntax 1
Suppose after this the control goes to some other function where I don't need a new line but using this syntax is enforcing that newline to be inserted unless I can think ahead and keep track of whether next line needs to be printed in newline or not.
std::cout<<"\nSome string"; //syntax 2
But by using the second syntax I can avoid such things and I only have to worry about the current statement.
Question- Is it only a personal preference of using either of the 2 syntaxes or is there any drawback to second one over the first one?