Hi experts,
I'm doing a OpenSSL project and I'm completely new to web server. I've got a client.c and server.c. client.c creates a connection to the server on port 6008 and reads data from stdin and then send those data to the server. The server.c reads data from socket and writes it back out to stdout.
I've got the server.c compiled o...
I've tried this on Linux and Windows... I've used C and C++... I've tried with wxWidgets, gtkmm, glfw and GTK+. I've tried with various IDE's and so on. (I managed to get GLFW to work fine at one point)
My problem is I am somehow not linking libraries properly. However I cannot find out which library isn't linked because the errors are ...
ta-lib is a technical analysis library written in C with ports in some other languages.
I wonder if there is any other similar open-source library also in C.
...
More specifically, I have (simplified) the following:
union foo
{
volatile int bits;
char data[sizeof(int)*CHAR_BIT];
}
If I never access the first sizeof(int) items of data, can i rely on bits working as expected?
...
how to create user defined header files in C step by step please including the compiling process as well :)
SOLVED TY ALL
...
Possible Duplicate:
What is the size of void?
Hi all !
I am using gcc for compiling my C programs, just discovered accidentally that the sizeof(void) is 1 byte in C.
Is there any explanation for this ? I always thought it to be ZERO (if it really stores nothing) !
Thanks !
...
In C programming, is there any way to determine how much a single source code file contributes to the final memory footprint?
Let us assume a simple C-program consisting of source files test1.c, test2.c, test3.c, and so on. The environment is Linux and the complier gcc.
With objdump and readelf can be seen see the total footprint and h...
Hello Friends,
I want to connect turbo c or turbo c++ program with any database like
MS Access/SQL Server/Oracle/MySQL.
If any body know then please tell me and also give source code for it.
Thanks,
Karandeep Singh
...
I need to read and print data from a file.
I wrote the program like below,
#include<stdio.h>
#include<conio.h>
int main(void)
{
char item[9], status;
FILE *fp;
if( (fp = fopen("D:\\Sample\\database.txt", "r+")) == NULL)
{
printf("No such file\n");
exit(1);
}
if (fp == NULL)
{
printf("Error Reading File\n");
}
while(...
Is there a portable way to detect (programmatically) the memory page size using C or C++ code ?
...
Good day all,
I am a beginner in c programming.I have this problem and have have spent quite a huge amount of time on it without any considerable progress.
My problem is stated thus:
I have a series of files with the extension (.msr), they contain measured numerical values of more that ten parameters which ranges from date,time,temper...
I'm experiencing a weird problem. I have a for loop, inside the loop there is a switch statement. The counter in the for loop is a pointer that points to the beginning of a primitive array, it increments itself till it finds a "terminator number". The array pointed is used to build a view, each elements represent a subview to put in the ...
When we talk about dereference, is it necessary that * should be used in it? If we access the referent of the pointer in some other way, can it be considered as dereferencing a pointer or not, like:
char *ptr = "abc" ;
printf( "%c" , *ptr ); // Here pointer is dereferenced.
printf( "%s" , ptr ); // What about this one?
That is the f...
I have difficulty in understanding the use of union in C. I have read lot of posts here on SO about the subject. But none of them explains about why union is preferred when same thing can be achieved using a struct.
Quoting from K&R
As an example such as might be found
in a compiler symbol table manager,
suppose that a constant...
Hi folks,
I've been trying to figure out how to wrap the following C functions = compress.c , compress.h.
I tried following the tutorials, but after creating the .pxd file I don't know what to do :|
From what I have understood this is the pxd file that I should have
cdef extern from "compress.h":
size_t compress(void *s_start, v...
I got the code from wikipedia for linked list ( http://en.wikipedia.org/wiki/Linked_list ).
But it prints the result in reverse order (5 4 3 2 1 ). How to make this to print from begining ( 1 2 3 4 5).
...
Hi I want to tokenize a string in C
Following is the string.
{Job Started}{Job Running}{Job Running}{Job Finished}
I want to tokenize on { and } , so that I get "Job Started", "Job Running" and "Job Finished"
I also want same delimiter to be used as escaped characters
{Job Started}{Job \{ID1\} Running}{Job \{ID2\} Running}{Job Finis...
Hi,
I have defined a constant array in one of my classes as:
static const float values[] = {-0.5f, -0.33f, 0.5f, -0.33f, -0.5f, 0.33f,};
In the dealloc method of my class, do I need to free the memory occupied by this field? How do I do it? Should I use NSArrays instead?
...
Hello. I have this code:
#include "stdafx.h"
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
void _tmain(int argc, TCHAR *argv[])
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
printf ("Target file is %s.\n", argv[1]);
hFind = FindFirstFile(argv[1], &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
...
I've picked up some old code that I need to work with and I have the following function in C
int pem64_decode_bytes(const char *intext,
int nchars,
unsigned char *outbytes)
{
unsigned char *outbcopy = outbytes;
while (nchars >= 4) {
char
c1 = intext[0],
c2 = intext[1],
...