Thanks. I learn some new stuff :)
Type: Posts; User: zhengkoon8
Thanks. I learn some new stuff :)
i read all from file into char.
i want sort all the file column of the file.
but not sure how. that y i try to do in this way
Thanks Jim for reply. I noticed of using the strcmp. but the things is I only want to sort the float number only rather than whole string. from my knowledge of strcmp is compare the size of string...
Thanks for all your suggestion and i able to solve this problem d
Hi, I am facing the problem of sorting the file. Can you all advice me for it.
My input file is like below
12.000 kkkmm
34.3354 sdjfj
2.0085 hjfh
...
and so on
I have not write the program for hex. Still in process. but the expected output should be like something like this
output
float 1022.12
hex 03FE.1EB8
int 1022
hex 03FE
float 1022.12
I have not write the program for hex. Still in process. but the expected output should be like something like this
output
float 1022.12
hex 03FE.1EB8
int 1022
hex 03FE
float 1022.12
I have done casting. and it work. but the casting cannot retrieve the value or decimal point onward when cast from integer back to float right? Do you need this code?
Then if I change the display of float to int then will I able to get change back for the float display?
I want to do the conversion for the following type mention above. I am stuck of doing it. Is anyone have any idea of doing the conversion above? Thank you very much.
Thanks for this suggestion. I learned some new stuff
Thanks jimblumberg. I have try this out. I know that doing in main can work for it. But I wonder is there another way to do it? Or string is it possible for it?
I need help for calculate the number of element of the array of pointer inside a function. But I always get a return value of 1 element. Is there any way to program it to get the correct value?...
ok. if i am using realloc, how this function be used?
Jim, sorry for troublesome you again. I go to website study about buffer[BUFSIZ], but i cannot read it into a variable and store it. and for the
the malloc is void and how it going to...
Any help?
And Jim, if i really dont know the size of array, what i should do? as my text file will be very long. this is just make me easy to code and debug only
Thanks Jim. I solve the stack error. but can u further explain for the atoi()? not sure what you mean by it. Thank you very much.
I want the size of array depending on the file line. so i write like this so that the size of array is vary.
Having Run time check failure #2-stack around the variable "numbers"
Need help thank you
my input file is below
5
8
10
I have study a book of C programming and it shows answer for the question but i cannot get back the answer that show in the book. The output is
values[0] = 197
values[1] = 0
values[2] = -101...
I thought c free standard is a compiler. Because this is the software that i use to write the code and test it
Sorry for not mention the compiler that I use before post the code. My compiler is C free standard. So is my fault that didn't mention my compiler.
Thanks Adak for the suggestion.
I will try it Elysia. Thanks for the suggestion also. I can learn more by trying more coding. And thanks for the Tool that suggest me the book. Thank you very much.