What I understand that hexadecimal numbers can be placed into string using \x. For example 0x41 0x42 can be placed in string as "\x41\x42".
char * ptr = "\x41\x42" ;
printf( "%s\n" , ptr ) // AB
\x is discarded and 41 is considered as a hex by the compiler.
But if I pass it to my program through command line arguments, it does not wo...
I'm trying to cross-compile the OpenCV library for using it on an embedded system running Montavista Linux(the system has an ARM926 processor). I've managed to configure and generate the makefiles; the sources are built OK, including the 3rd party libraries. The trouble comes at link time. For some reason libtool picks some libraries fro...
Hi All:
I'm using python2.5 with scipy.weave to embed c code.
In my c code, there is no malloc() function, but I received error like
"glibc detected *** python: malloc(): memory corruption"
from time to time.(It's a random algorithm)
So how shall I debug it out?
Thanks
...
hello every body
i am beginner in Anci c programming here is the description for my program
my program first asks user to press any key then a new console is opened and the user inputs any number he want then the console is closed and the number he typed is printed in the parent console ,i hope this clear and thanks for reply
so i wa...
I've come across a bit of code that contains a couple code blocks, delineated with curly braces {}. There is no line before the code blocks marking them as part of if statements, function definitions, or anything else. Just a code block floating in the middle of a function. Is there any meaning to this? gcc seems perfectly happy going...
Is there an API only for sound? API's such as Allegro or SDL provide too much for my needs. I simply need a library that can do something like:
InitSound();
Sound *door = LoadSound("door.wav");
PlaySound(door,volume);
It would also be great if it could support compressed formats such as vorbis or mp3.
Thanks
...
hello,
i have problem with the third function (GetMatrix) the others are works.
i want to catch data from user into the matrix by poiters only
the lines:
typedef int pArr[COLS];
void GetMatrix(pArr* ,int , int );
M[ROWS][COLS];
are constraints
how i need to do the scan, i try to use scanf("%d",*(M+cols*i+j))
but i get error..its p...
If we have:
__int32 some_var = 0;
What is the best (if any) way to call InterlockedExchange, InterlockedIncrement and other interlocked functions which require LONG* for some_var ?
Since, there is guarantee that LONG is 32 bit on any Windows, it's probably safe just to pass (long*) some_var. However, it seems to me quite ugly and I c...
Is there a way that you can assign memory from heap without a call to malloc?
Can the following call be affective for it?
void* loc = (void*) &heap[end_of_heap];
...
Is there any method like the Java can .length from a C point array? Thank you.
...
I have an "array" of bytes that is referenced in some high-level client/developer documentation (which does not contain any programming language or environment specific information). In this document, bytes are currently referred to as "byte 3" or "byte 17", etc. The development environment is C/C++ and the bytes are stored in an array i...
I have gotten the GLUT 3.7 source and opened the MSVC project. I switched DLL to static lib in the project settings and got a lib. I then linked against it in my application, and added the GLUT_STATIC preprocessor definition. It creates the window and renders one frame of my game and that's it. Whereas the game runs just fine with the dy...
Greetings,
How can I simply encode some binary data into an ASN.1 DER-encoded blob? I'm using C/C++, and I figure it should be possible to simply prefix the binary blob with some appropriate bytes that signify that the data is of type octet string and is of a given length (and in a sequence of length 1 I guess).
Background if you're i...
Possible Duplicate:
How would you set a variable to the largest number possible in C?
Can we find the maximum size of a data type in C langauge?
...
I have been trying to figure out how can we print a array hellically but i am stuck on how to get started.Any algorithms or ideas will be very helpful.Thanks
HELLICALLY means printing the array in concentric circular shape
...
While reading about memmove I read that it can handle *MEMORY OVERLAPS*but I am unable to get how a memmory overlap can occur between two strings and how can this function still copy the block of memory correctly.
...
hi....
how can i use POSIX header files in system programming?
i used <unistd.h> in C. what are other header files i can used?
...
I am looking for existing implementations of different types of DES in C/C++/C##. My running platform is Windows XP/Vista/7.
I am trying to write a C# program which will encrypt and decrypt using the DES algorithm. I need some implementations with which i can verify my code output to see if i did the things in right order. For the imple...
int main()
{
...
if(!fork())
{
execvp(cmdName,cmdParam);
}
printf("In main()...");
return(0);
}
Assuming I have correctly passed the cmdName & cmdParam arguments, how do I wait for the process created by execvp to finish, before resuming the execution of main()?
Does the execvp() create a proces...
When I write code in C, I often get confused when the questions/problems demand the usage of the output for further calculations.
For example, if we have to print an array and then add only the prime numbers from it?
or something which is similar. I get stuck and I don't know how to tackle such questions.
As in when we take input from...