giovedì 18 aprile 2013

Development, C & Gtk, Nice Code Programming

YouTube


Useful, Nice & Special Commands..

  1. Linux:
  • Ever Wondered or Looking for
    - How to scroll in a terminal ? -
    ..simply hit..
"Shift" + "Pg Up"
or
"Shift" + "Pg Dn"
  • In the Functions of the printf() family to force the output size, for example, of %d we can use %2d, %3d and so on..
    But pay attention becouse you could have the need to use %.2d, %.3d and so on.. take a look at the example below:

    int n = 6;

    printf("My number is %2d", n);    // This will print 'My number is   6'
    printf("My number is %.2d", n);   // This will print 'My number is 06'

    Using sprintf() the difference is very relevant/important!

Nessun commento:

Posta un commento