difference between far pointer and near pointer in C.
can any body tell the difference between far pointer and near pointer in C? ...
can any body tell the difference between far pointer and near pointer in C? ...
I have a handle leak in a big old program. Using sysinternals handle.exe I deduced that the type of handle that is leaking is an "Event" handle. But I'm not sure what parts of my code I should be looking at. Is there a list somewhere of functions that return handles to events? EDIT: There is not a single instance of CreateEvent, CreateE...
I have a SVD library implemented in C. But I want to call its functions in a Java program. Is there a easy way to do that? Or someone please suggest a link for a SVD implementation in Java. ...
I need to write a program (a project for university) that solves (approx) an NP-hard problem. It is a variation of Linear ordering problems. In general, I will have very large inputs (as Graphs) and will try to find the best solution (based on a function that will 'rate' each solution) Will there be a difference if I write this in C-sty...
I am getting a strange result in the following C code. int main() { int *p = (int *) malloc(100); p[120] = 5; printf("\n %d", p[120]); } Since I have allocated only 100 bytes, this code should give cause a segmentation fault. However, it prints '5' and does not give any runtime error. Can anyone please explain the reason?...
How to subtract one audio wave from another? In general and in C# (or if we cannot do it in C# in C/C++) I have sound wave A and sound wave B (BTW: they are in PCM) I want to subtract B from A What do I need? Open Source Libs (NOT GPL, but LGPL will be ok) Tutorials on how to do such operation (with or without using libs) Articles o...
I am trying to implement the adaptive huffman code, but while trying to build the tree i get a segmentation fault when executing the code at line "currentNYT->lchild = newNYT;" in addnode() function. Could anyone please help me out? It might be something simple i'm not aware of. didn't use C for a while now. //variable and type declara...
I have this look up table : char *table[ascii][morse]; where ascii is an int (representing an ascii letter) and morse is a string of length 4 + 1 ( to add the null). It is a look up table in a way where you ask for letter 0 = a and it should return the morse represntation of it. if I have a ..-. (for example) in a file. and i want to...
I get a segfault when calling viewTree(root); struct treeElement { unsigned long weight; unsigned short id; char chr; struct treeElement *lchild, *rchild, *parent; }; typedef struct treeElement node; node *root; //INITIALIZE TREE void initTree() { root = malloc(sizeof(no...
I have the following statement: printf("name: %s\targs: %s\tvalue %d\tarraysize %d\n", sp->name, sp->args, sp->value, sp->arraysize); I want to break it up. I tried the following but it doesn't work. printf("name: %s\t args: %s\t value %d\t arraysize %d\n", sp->name, sp->args, sp->value, sp->arraysize); How can I break it up? ...
Hi all, My problem is this: I have a C/C++ app that runs under Linux, and this app receives a constant-rate high-bandwith (~27MB/sec) stream of data that it needs to stream to a file (or files). The computer it runs on is a quad-core 2GHz Xeon running Linux. The filesystem is ext4, and the disk is a solid state E-SATA drive which sh...
i have a unix c programming assignment in which i do some advanced C network programming.this is my first step into advance programming. so i was wondering what is the best combination of tools for this on a mac. using an IDE like Eclipse is how i'd normally do it but i have to make my own makefiles and stuff. so i would like to learn ho...
I wrote a simply OpenCL program based off the SDK and it compiles and runs, however the output is wrong. Is there something I'm doing wrong? Any suggestions for learning to debug C and OpenCL is much appreciated. I'm quite new to the platform. Code is below. The output in array c is all zeros. Thanks. test_opencl.h #ifndef _TEST_...
This may be waaay to specific for SO, but there seems to be a dearth of info on the sun raster standard. (Even JWZ is frustrated by this!) Intro: The Sun raster standard says that rows of pixels have padding at the end such that the number of bits in a row is a factor of 16 (i.e. an even number of bytes). For example, if you had a 7-p...
Hello, I used openSSL command to create 2 files: 1 for RSA public key & 1 for RSA private key. How do I recover RSA keys using C? Specifically, I have these functions: RSA_public_encrypt(read_num, in_buf, out_buf, public_key, RSA_PKCS1_PADDING); RSA_private_decrypt(read_num, in_buf, out_buf, private_key, RSA_PKCS1_PADDING); The 4th ...
Hi Fellow programmers, I want to write a standalone GUI based app for administering one of the most popular enterprise middleware products from a very big company. But that big company already has a admin tool and its free. But guess what , its very very slow , since its written on the java/Eclipse platform. I want to write a very fast...
In C, I want to display every single character that the user type as * (Ex, Please type in your password: *) I'm searching around but can't be able to find a solution for this. Does anybody know a good way? ...
I work on an open source project focused around Biblical texts. I would like to create a standard string format to build up a search string. I would then need to parse the search string and run the search with the options given. There are a number of different options, from scope of the search, to searching multiple texts, to wildcards, ...
The implementation of file compressors that I saw was always compressing arrays of bytes. But it can compress arrays of shorts instead or even ints. If each symbol in a Huffman binary tree represents a byte we can compress at the most 8 bits in a single bit when it is optimal. If each symbol in a Huffman tree represents a short we can...
This source code was based on adler32 It aparently provides the same level of security of crc32 but 50 % faster If it has a flaw can someone show to me where is the flaw and why it is better to stay with crc32 ? It is not easy to find data collisions in the same level as crc32, at least in my tests unsigned int rsp32 (unsigned int ad...