“printf” on strings prints gibberish

I'm trying to print a string the following way:

int main(){
    string s("bla");
    printf("%s \n", s);
         .......
}

but all I get is this random gibberish.

Can you please explain why?

14
задан doubleDown 2 August 2013 в 20:00
поделиться