[cs13001] Variant insert for string

Mikhail Nesterenko mikhail at cs.kent.edu
Tue Oct 8 07:29:26 EDT 2013


> do you know
> why it wont let me have int type as the 2nd argument?

> cout << date.insert(0 ,num ," "); // supposed to insert number of white

needs to be:

   date.insert(0, num, ' '); // a single character "num" types

or

   date.insert(0, " ");  // a string


Thanks,
-- 
Mikhail


More information about the cs13001 mailing list