I need help with passing by reference, I keep getting corrupt output when I try to do the following:
Guys .....greetings...
My programme to find the prime number below 10000 is ready to go. But I want to use malloc function in my programme to create memory ...
Hi there;
I am trying to enc/dec a string but I have a problem that the enc/dec. string are not matching.
What to do?
Im try to get partitions of given no in c language
it give output lik this.
(null)Enter a number : 4
(null) 4
(null) 3 1
(null) 2 2
(null) 2 1 1
(null) 1 1 1 1
i need to remove (nu...
I'm currently trying to port C from Win to Linux. The code has been compiled on windows using MS Visual C++. What's the 'correct' way to port it to linux?
a) Setting MS Visual C++ to compile ...
IN C we have data types like long , float
we can also use nested ones "long float x ; " , " long double y ; "
Is it possible to nest them one levelmore like " long long long x...
Hi,
When i use this,
double log2( double n )
{
return log( n ) / log( 2 );
}
i get this error..
Overloading ambiguity between "log(double)" and "std::log(float)". oh...changing ...
i want to know how to write the program for operator overloading
Hi, I would like to know why we are using function protoype when we have the function definition (function header) that state the same things?
How does a C compiler treat two files that include each other? I guess it would be a circular reference, but how is it resolved?
Also, is the answer standard for all compilers, specified...
Hi, I am writing a program in pure C that uses fork and then in the new process calls execvp, if the call to execvp returns, I want something else to happen. In the mean time for the calling ...
Hi,
In ANCI C program under Linux (Debian Etch) I need to open a file for reading for a while but this should prevent other threads or process from doing the same during this time. For ope...
Hi, this question is about how your typical C compiler/linker works. If it varies from compiler/linker to compiler/linker, I'd like to know that too.
When you make a set of C source file...
Here is what I want to do in plain language:
Get the word from the user
check the first letter of the word and compare it to the next letter; if the first letter == the second letter then ...
What on earth is trapoline code ?
cc1: error: trampoline code generation is not allowed without -ftrampolines
The error disappeared after commenting out the code before which relates to ...
Let's say I've got some working code.....
printf("%ld",edata->val4);
I've been struggling to find away to provide the second argument dynamically...
Is it possible ?
I have two csv files one is 4 columns and one is two columns.
In first csv file 4th columns is empty. I need to compare string in first column of second file and 2nd column of first file if ...
Hello Experts,
I will make it short and smooth. Have the following code for a UDP C/S.
Those both work allright in my 2.6 Linux (192.168.1.2) server together, i.e,. client sends a message ...
I seriously dont know why its not working :)
need help and coments on what can i do to improve or correct my code.
I wrote the simple code below and run it in debug mode. When I check the memory I found the data store in mem is:
0x0012FF33 cc cc cc cc cc cc cc cc cc cc cc cc 64 cc cc cc ............d......
Experts,
do I need to allocate/free space for a static pointer to a struct that's defined at the beginning of my source file?
thanks!
the code copies a string to antother array of strings from one position to another and my problem is that i want to "push" it into a bidimensioal stack wich i made and im still new on pointers...
i want to put the creation of a dynamic 2d array into a separate source file and call it from my main
this is what i've done until now but something is going wrong in there ...and cant figu...
I'm trying to use RegOpenKeyEx to read a registry entry that exists. For some reason the call returns 2 (does not exist). What could I be doing wrong or how can I debug this?
Thanks!
We're struggling to come up with an algorithm to create a sudoku puzzle.
Should be fairly trivial but it isn't.
Can anyone shed any light?
Many thanks