   best way to go about this? help...
  im stuck. Im not a perfect programmer, infact im pretty new and i need some help, i want to store a number, thats 15 figures, like000000000000001but if i store it in normal int, it will take away the zeros, wich i need left,the problem is i have to be able to add to this figure, so if i use an array, i will get stuck after 10 adds since then the last spot will be filled, i want it to go like a normal number, so when ive added 10, the second last place starts filling up, please help me i starting to get kinda stressed about this. i need it today and right now, i cant find a solution myself so, someway to store my number 000000000000001 so i can just myvariable++; to get 000000000000002 myvariable+=10; to get 000000000000011 and so onthanks allot for any awnsers 
  You want to be able to print the number with blank space filled by zeros to a width of 15 characters.What language are you using? If it's C I'll recommend one solution and if it's C++ I'll recommend another solution.edit: I'll give you a hint though first. It's in the documentation for the functions you use to print stuff to the screen.   [edited by - petewood on February 12, 2004 5:54:09 AM];  well its not really important that it looks that way on the screen, im going to use it in an SQL query, to a database, and its importat that its 15 numbers, easiest starting from 000000000000001, in my point of view, so i create a buffer to contain my sql query,(by the way i use C in this project because i couldnt get some basic c++ to work, linux, im not to good at setting it up so, i went with C:/) sprintf(query, "INSERT INTO table (columns, bla bla bla) VALUES (%d, %d, %d, value)", variable1, variable2, variable3);you know how i mean?;  check Jingo''s posts in this recent thread;  ah, sorry you said C not C++.you can print to a string (rather than the screen) and then use that as your query. see documentation for sprintf;  hehe thanks for the links, but my mind is really standing still right now, could you maybe give me an example? do you mean something like this?sprintf(aNumber, 000000000000001) ?and then?im so sorry for this stupid question ;  I think:sprintf(query, "INSERT INTO table (columns, bla bla bla) VALUES (%d, %d, %d, value)", variable1, variable2, variable3);should be rewritten:sprintf(query, "INSERT INTO table (columns, bla bla bla) VALUES (%015u, %015u, %015u, value)", variable1, variable2, variable3);;  but if my variable becomes > 10, it wont ad a 0000000000000010?a 16''th number after that 1? ;  read the documentation. you can write to a string and specifiy the width and what the fill in characters are. ;quote:Original post by Mupp  but if my variable becomes > 10, it wont ad a 0000000000000010?a 16''th number after that 1?   you are able to know if it''s greater than 10 and take appropriate action.anyway, the width setting for sprintf is total width so you don''t have to worry. 