donbock,
I respectfully disagree. Again, study C's standard library.
I would add to that, don't declare static arrays that are allocated from the stack. They are just big, immovable, non-plastic obstacles that constantly get in your way. You can't realloc() a static array, and it takes up lots of contiguous memory you can't release.
Putting these two together, for example, programming with pointers will have...
User Profile
Collapse
-
To Rabbit's point, if the file is small, and you don't need an ongoing solution, just load the file into notepad and replace "," with "."
You might want to try the Unix/Linux utility Awk. MS Access has a good import Wizzard that will make these problems very manageable, and you you'll have a trial & error environment to see if you guessed right. Once in Access you have lots of output options - like ...Leave a comment:
-
To expand on WFC's point, you have a bit pattern occupying space, a bit, a nybble, a byte, 2 bytes, 4 bytes, 8 bytes, etc. (a great feature of C is it separates storage from the use/type of the storage - so an important point to get)
That storage can be used/viewed to store many different types, but in C, a character is its position in the ASCII table, IE, the character is a number - the EXACT SAME number whether you view it as binary,...Leave a comment:
-
donbok,
Agree with your points in general, but nobody should code in C and use subscrips for anything. C just doesn't want to work that way.
Take a look at the standard C lib. Not one single function in it returns an array. They all return pointers. An array, in an environment where all array contents are guaranteed to be contiguous, is just unnecessary context. You can code in C, and more naturally, without any array subscripts,...Leave a comment:
-
Elsa,
I don't think your question was answered, and while having good intentions, these responses underestimate the complexity of an integer power function pow(dbl, int) that is faster than MSFT's pow(), and is general purpose enough to handle any integer exponent.
My suggestion would be to first benchmark your compiler's pow() by running it in a loop a million or 10 million times, as I tweaked this function a little...Leave a comment:
No activity results to display
Show More
Leave a comment: