|
One at a time. What's the problem?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
An array of characters already contains the ascii values of those characters, no conversion is necessary. If you want to copy them to another array, just loop through.
Kelly Ryan
|
|
|
|
|
If my array a[] has three characters A,B,C. If I print the array it is giving just the characters. I want 65,66,67.
|
|
|
|
|
Just print them as integers.
printf("%d %d %d", (int)a[0], (int)a[1], (int)a[2]);
Kelly Ryan
|
|
|
|
|
no need to cast into (int)
|
|
|
|
|
I like to avoid my old g++ UNIX compiler warnings
KR
|
|
|
|
|
then, prefer using static_cast<int>()
|
|
|
|
|
how do you print ? use %d instead of %c in printf()
|
|
|
|
|
did you understand my answer ? NO conversion actually NEEDED !!!
|
|
|
|
|
a simple for loop... utilizing the above ASCII conversion example for each iteration of the array
|
|
|
|
|
Thanks guys, I'll try them out.
|
|
|
|
|
hi all,
can we remove desktop icon programatically ?
venu
|
|
|
|
|
You already asked this question. Be patient.
|
|
|
|
|
Hey, we have money. We can pay for it.
We have to format a SD Data card from with-in a program. It has to be FAT16, and we don't want XP's format dialog box to come up.
We have been searching on several sites that sell C++ libraries, nothing exists! It looks like we will have to go raw and manually format the drive.
Thing is, this code has to have been written a hundred times. It doesn't seem like something we should have to write again.
Does anyone know of a library that can be purchased to do this?
Thanks for the responses - I love the Code Project site!
-Matt
|
|
|
|
|
YOu mean like this[^] ?
led mike
|
|
|
|
|
MSDN: The format is controlled by the dialog interface. That is, the user must click the OK button to actually begin the format—the format cannot be started programmatically.
|
|
|
|
|
No, that opens a format dialog.
|
|
|
|
|
|
I looked at that article and discarded it because:
) It displayed a dialog (I hadn't thought of making the dialog invisible)
) It looks like the user has to press the 'Start' button
) I'm not sure how you would force it to FAT16
-Matt
|
|
|
|
|
TheMattster wrote: It looks like the user has to press the 'Start' button
You can programmatically "click" buttons.
TheMattster wrote: I'm not sure how you would force it to FAT16
In much the same way as the article showed how to set the volume label. Enumerate the child windows until you find the File System combobox.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
TheMattster wrote: It displayed a dialog (I hadn't thought of making the dialog invisible)
Making the dialog hidden is trivial.
TheMattster wrote: It looks like the user has to press the 'Start' button
Nope - that's automated.
It's trivial to automate it.
TheMattster wrote: I'm not sure how you would force it to FAT16
Default is FAT16 (though it says FAT)
|
|
|
|
|
Ok, you can hide the form and populate the fields and simulate the click.
It just seems really clugie to me. All this extra code to try and force something to work a way it is not intended to work.
I'd rather just call a routine.
-Matt
|
|
|
|
|
TheMattster wrote: I'd rather just call a routine.
Problem is that disk-access is usually done at a lower level. So you won't find an app-level library capable of doing that.
|
|
|
|
|
hi all,
how can we remove desktop shortcut icon programmatically ?
venu
|
|
|
|
|
It's just a file, delete it like you would any other file
|
|
|
|