First of all, I am not a programmer. Basically I am a hobbyist.
I started programming in pure ANSI C (scanf, printf, getchar etc) 20 years ago reading
C step by step by Waite Group and I did not program in C++.
That's why I am not familiiar with cin, cout etc and posted that.
Of course cout, cin do the same work. It is up to everyone which commands he/she prefers.
Todays I program in C#. I prefer this:
Code:
public class Example
{
public static void Main()
{
printf("With the default new line characters:\n");
}
}
instead of:
Code:
public class Example
{
public static void Main()
{
System.Console.WriteLine("With the default new line characters:");
Console.WriteLine();
}
}
Because C is a subset (which means that any C command is supported by C++, C#) I cannot understand why they developed equivalent (OK not at all) commands in them....