Why not? Its just a (binary) file. Some Operating Systems might not allow it under certain conditions though.
Type: Posts; User: fischerandom
Why not? Its just a (binary) file. Some Operating Systems might not allow it under certain conditions though.
The physical file size may be different under different file systems, OS, media type, and even from time to time under the very same of the above mentioned because the OS usually align files to a...
To count the number of sandcorns in the hottest desert on earth, what would be the best way to do that you think, of the choices given below:
A] Let's count one sandcorn a time. . .Really simple!...
Don't use obsolete technologies such as DOS. Use the Win32 API, etc.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_start_page.asp
Study!
In general it is not possible for the non-psychic compiler to know that Seq<T>::iterator is intended as the name of a type (type name) rather than the name of something that is not a type (such as a...
Instead of using a global variable, you can use a local static variable instead:
void f( ) {
static int countDown = 3;
if ( countDown-- ) /* The first three times this...
usleep( 100000 ); /* Sleep 100000 micro seconds = 100 ms, etc. */
One link:
http://www.opengroup.org/onlinepubs/007908799/xsh/usleep.html
Another idéa is to use a memory pool!
Allocate memory pool(s) with an arbitary size with malloc( ), etc. Then you get memory objects from a pool with your own allocate( ) function. When it's...
You may consider using fraction numbers instead of floatingpoint.
typedef struct Fract {
int numerator;
int denominator;
} Fract;
#define FRACTS 2
I have worked and developed products based on the PIC16F878A. I can recomend using the CC5X C-compiler, its good. You will face challenges trying to work with pointers, because a PIC has only the W...
I have a big interest in chess so I would write a Chess program, or actually I would write a Fischerandom Chess program! That's a challenge. But you shall choose a task that You think is interesting...
Hello Isabella!
You can try a program called WaveLab. That program can do exactly what you want to achieve. Writing such a program is not so hard for an experienced programmer, but for a "newbie"...
If using bit-fields are slower than using manually coded bit-wise operations or not,
depends on two things as I see it. First, if the compiler is smart it may produce a
similar sequence of bit-wise...
The line:
something anything;
is, in this case, C++ code not C (because the type something is not typedefed). A C-compiler (at least an ANSI strict C-compiler) will require:
struct...
Read the C-compilers manual for the microprocessor you are using. They usually give usefull advice on the topic you are asking about.
And also, some microprocessors have only a single register...
Who designed the hardware?
1. Test the hardware, i.e., write a char to the LCD, etc, and you can read the rotary encoder wheels on the bus. Stuff the data in a variable, declaring it volatile is a...
OK, I am talking about why some people, even experienced programmers, prefers a plural naming scheme of arrays/vectors instead of a singular naming scheme. I simply wonder why! I use the singular...
The greatest flaw in humans! They can't confess they're wrong even when they know they're wrong!
On the chessboard lies and hypocrisy do not survive long. The creative combination lays bare the...
Salem often use the plural form when declaring arrays of things, if that makes the code more readable.
In what way does it make the code "more readable"? When declaring the name of an array or...
What Salem just wrote above is very common, I see it so often but I think it is an illogical array- or vector-naming scheme. Why do some people, even experienced programmers, use:
typedef struct...
What processor and compiler are you using? The best technique to use depends on the C compilers implementation of the code you are using because some MCU's have very little registers (some PIC...
I never use function recursion because it consumes more processing time and resources (the stack) and there is a risk that the stack is blown. Its an abuse in the art of programming a computer to use...
An algorithm based on A.I. is an algorithm that is trying to make a choice (the best) based on the criteria given, in a given situation from a number of choices. It acts intelligent.
unsigned char out, mask;
#define BITS 8
mask = ~0 << ( BITS -bits );
out = pixlesin[ n ] & mask;
I haven't tested this, so it may be wrong but this may give you an idéa at least.
The built-in types of C or C++ have a strong logical link to the type of data that hardware, i.e., the processors that are built with high-level language support in mind, has support for directly (in...