Extern and Static Pointers in C
Hi what could be the usage of static and extern pointer ?? if they exist ...
Hi what could be the usage of static and extern pointer ?? if they exist ...
How to debug the JNI code in VisualStudio 2003 without using eclipse? ...
Are there any bignum libraries that are good for Windows use? I looked at GMP, but unfortunately it does not look like it can be compiled on Windows...I'm going to be doing some custom RSA and hashing routines, and I need something that can handle extremely large integers. Thanks. ...
When we free() memory in C, why is that memory not filled with zero? Is there a good way to ensure this happens as a matter of course when calling free()? I'd rather not risk leaving sensitive data in memory released back to the operating system... ...
I'm writing some functions that manipulate strings in C and return extracts from the string. What are your thoughts on good styles for returning values from the functions. Referring to Steve McConnell's Code Complete (section 5.8 in 1993 edition) he suggests I use the following format: void my_function ( char *p_in_string, char *p_ou...
I know that converting a pointer to one int is unsafe, because the pointer can be bigger than the int in some architectures (for instance in x86_64). But what about converting the pointer to several ints, an array of them? If the pointer size is 2 times bigger than int then convert pointer* to int[2]. The number of needed ints then is ...
I have a GUI application written in C/C++ using gcc. I need some recommendations for writing an automated test system for it. What tools/scripting should be used? The application runs on Windows. ...
I have a Windows service (under WinXP SP2), running under the LocalSystem account, that launches processes using CreateProcessWithLogonW. In order to clean up child processes, I'm trying to use a job object and TerminateJobObject. MSDN states that the job handle must have JOB_OBJECT_ASSIGN_PROCESS access right, which it has since it's c...
Can someone elaborate on the following gcc error: gcc -o Ctutorial/temptable.out temptable.c temptable.c: In function ‘main’: temptable.c:5: error: ‘for’ loop initial declaration used outside C99 mode temptable.c: ... /* print Fahrenheit-Celsius Table */ main() { for(int i = 0; i <= 300; i += 20) { printf("F=%d C=%d\n",i...
I have to code a Java program that will receive messages from network and display their content to the user. The problem is that the messages that I receive are simply binary dumps of C structures. Add to this some of the messages are coming from little endian machines and some from big endian without the fields being converted to networ...
As title says, is there any elegant and safe way to determine if architecture is 32bit or 64bit. By elegant, you can think of precise, correct, short, clean, and smart way. By safe, think of safe in term of standard, C89/C99, and operating system independence. ...
I am trying to read some settings from php.ini using zend. The API that I am using is long zend_ini_long(char *name, uint name_length, int orig) But it always returns 0. I have double checked the name and also made sure that the value I am specifying in php.ini is greater then 0. Is there anything I am missing? ...
Hi, I just started learning C, and I am looking for a simple tool for debugging in gcc environment. Such tool would print a stack trace, and indicate where a segmentation fault occurs. ...
I'm willing to write a subset of Perl's DBI interface for libodbc (or unixODBC) in C++. I believe doing so will allow me concentrate better on my goal. BTW, I prefer avoiding to reinvent the wheel, if of course something similar is already out there. ...
I am looking for a spell checker for c++ source code. Unfortunately all I can find is Visual Studio specific. I would like something which works on Linux. Edit: Ultimately I want to automate it in some way. I am not very proficient in spell checking, but what I am thinking of is a not-interactive console tool which prints error messag...
If so, what's the name of the command line tool to compile resources? Or an example of use... I have access to the Professional suite (both Linux and Windows environment but I'm interested mainly in the Windows one), thanks in advance. ...
I was wondering how to use GCC on my C source file to dump a mnemonic version of the machine code so I could see what my code was being compiled into. You can do this with Java but I haven't been able to find a way with GCC. I am trying to re-write a C method in assembly and seeing how GCC does it would be a big help. ...
I'm writing an embedded control system in C that consists of multiple tasks that send messages to each other (a fairly common idiom, I believe!), but I'm having a hard time designing a mechanism which: is neat is generic is relatively efficient most importantly: is platform independent (specifically, doesn't violate strict-aliasing or ...
Dear all; I will be coaching an ACM Team next month (go figure), and the time has come to talk about strings in C. Besides a discussion on the standard lib, strcpy, strcmp, etc., I would like to give them some hints (something like str[0] is equivalent to *str, and things like that). Do you know of any lists (like cheat sheets) or your...
The questions says it all: ... int ndigit[10]; ...//fill in the array with 0s while((c = getchar()) != EOF) if(c >= '0' && c <= '9') ++ndigit[c - '0']; //<== unable to understand this part supposedly, the array stores incoming digit chars from the input stream... ...