Search:

Type: Posts; User: RLeePlusPlus

Search: Search took 0.01 seconds.

  1. Replies
    23
    Views
    5,051

    I understand... so 0 is used to specify the pad...

    I understand... so 0 is used to specify the pad when you put just the width, right? like "%03d". When you use width.precision, the precision of the integer will be always padded with 0s...

    So,...
  2. Replies
    23
    Views
    5,051

    I said that i tried it, and get answers like...

    I said that i tried it, and get answers like yours is over the top...
  3. Replies
    23
    Views
    5,051

    1 - I read the documentation before i post this...

    1 - I read the documentation before i post this question and i read it again when you said to. specifically on the width it says:



    widthdescription

    (number)
    Minimum number of characters to...
  4. Replies
    23
    Views
    5,051

    ok...

    man, you really S U CK S... telepatic? Its not about to accept and use! Its about WHY IS DIFFERENT or IS REALLY DIFERENT? What a stupid reply... leave this for who want to discuss. You should be...
  5. Replies
    23
    Views
    5,051

    Why it doesn't matter in VS 2010?

    Why it doesn't matter in VS 2010? in GCC/GPP i have to put the 0?
  6. Replies
    23
    Views
    5,051

    still got the same results

    i still got the same results, with or without the '0' preceding the width... Just for information, i'm using VS2010 express

    thank you
  7. Replies
    23
    Views
    5,051

    Yes i tried

    i have tried with this:




    sprintf(msg, "Teste %02.2d",100);
    sprintf(msg, "Teste %02.2d",100000);
    sprintf(msg, "Teste %02.2d",100000000);
  8. Replies
    23
    Views
    5,051

    Like what? i tried others too but with or without...

    Like what? i tried others too but with or without 0 (2.2 / 02.2) i got the same result. this is not a homework or something that i want you to do for me... If i'm asking here is because i really want...
  9. Replies
    23
    Views
    5,051

    Sprintf masks Doubt(s)

    Hi!

    i dont know what is the difference between the 2 masks (the result
    on visual c++ 2010 is the same):




    sprintf(msg, "Number %2.2d",10);
    sprintf(msg, "Number %02.2d",10);
  10. and the sizeof

    Thx for suggestions laserlight, i just have one more question...

    if i make a constructor in the struct, it will affect the result of sizeof(struct)???

    thank you!
  11. i forgot to say that the stInfo will be inserted...

    i forgot to say that the stInfo will be inserted into a vector of stInfo's... So it have to be a stInfo. And when i say tags i mean ID's like "001" or "002". It will be easier to do if a just cast...
  12. I see... The idea was cast and then evalue in the...

    I see... The idea was cast and then evalue in the struct fields, using they sizes and etc... Its really not safe to do this?
  13. i will use the first field to identify a tag and...

    i will use the first field to identify a tag and then according to the tag process the other fields. Its just a way to separate things to process.
  14. how to convert a char buffer to a struct in c++ ?

    Hi there,

    So i have a struct:



    struct stinfo{

    char info1[19];
    char info2[5];
Results 1 to 14 of 14