Hello. I'd like to know how structs are stored in memory. For example, if i have the following struct:
struct A {
int _a;
int _b
}
will it be safe to assume that if an instanc...
I have a method that you pass a pointer to. In that method I would like to retrieve the data that the pointer variable points to how can I do that ?
I'm writing an application in Delphi (using D2005) calling a DLL written in C using MinGW. So far it works fine, BUT I would like to debug the DLL using MinGW. I have added a host application ...
Hey xperts...
A friend of mine it taking an intro to C class and was asking for my help on a simple program. But since I don't know anything about "C", it was frustrating trying to help so...
Hi,
I have a binary file with uint32 values. i need to read those,convert them to scaled floating point (3 places) and write to a text file. For example:
00 01 23 4F 00 01 24 4D...
is 2...
To find the size of a data type which is being pointed to, it would be useless to get the size of the pointer itself, because that will always return 4 bytes. So of course, you need get the s...
I created this simple test program. It iterates 1600 times, malloc'ing and free'ing memory. Every 75th time through, it decreases the amount of memory requested. When I run it on Solaris or...
Hi, I'm trying to read an INI file in C, everything compiles fine except when i try running the application i get a access violation error and app terminates:
GetPrivateProfileString("TEST"...
I have a question about how wchar_t works. I understand that wchar_t is either two or four bytes, depending on your system, and allows a much wider range of characters to be stored than would...
who can tell me the algorithm about text editor(such as edit.exe in DOS and notepad.exe in windows). the text file is a stream of characters, but what data structure is it put in when it is lo...
I've been thinking about trying to run stepper motors through a controller available from www.parallaxinc.com from my PC.
The controller has a serial port for connecting to a PC. They have s...
I'm trying to load a flat fixed length file into a structure and I'm getting some garbage in the data fields.
Right now, I'm just trying to print to the screen the data that is in the file.
...
I know how to find the longest root-to-leaf path in the tree (which is the height of the tree), however I don't know how to find a tree's shortest-root-to-leaf path.
for example: (FYI binar...
Hi,
I am using int86x to find out the number of sectors on my drive. Since i am using extended 13h interrupts ( int 13h function 48h), i get the drive parameters in the DS:SI.offset 10h has...
I am familiar with array, typedef, struct, rational number, etc. Having difficulty with RATIONAL ADT using pseudo-C language constructs and how to implement it using C programming code. Wher...
Hi all,
Is malloc allocates sequential chunk and calloc doesn't?
if so how and why?
With Regards,
...
Can anyone provide me with the codes for sending a string of data to Com1. I tried using the Bios.h file and manage only to perform setting for the port and not able to send a string of data.
I always Floating point error: Domain.
Abnormal program termination
when I running my queuing simulation,
can anyone of you here can solve my problem
and tell me how the problem caused?
belo...
Hi,
When I compile program in Win98 DOS section or pure MS-DOS 6.0, I got a error message "Failed to locate protected mode loader (DPMILOAD.EXE)".
All I have to do is to get one? Or anything ...
Hi everyone,
I'm working on a project (log file parser) which requires to determine the
length of time of different clients on line.
At the moment I'm getting the date format as double dat...
Hi,
I am confused with the rand function..
To randomise numbers, I usually do this, n=rand()%10 where n would be somewhere between 0 to 9.
But while reading, found out that the RAND_M...
My flash memory driver is passed an address that points to unsigned int. In the flash driver, I send program command to the flash so I believe I need to typecast addr to point to volatile. S...
Windows XP
char *workbook_name;
char workbook_label[1024]="";
strcat(workbook_label, "test001");
strcat(workbook_label, workbook_name);
workbook_name is populated dyna...
Hi I am trying to write an insert method for a hash table. If I insert a key that already exists in the hash table then it just updates the value corresponding to that key with the newest one....
I am writing a program in C on my PC using Cygwin. At the moment I am encountering unexpected behavior when I run my program. What I want my program to do is first call the create_analyzed_f...