I seem to misunderstand a basic syntax, why this sample works:
sqlite3_prepare_v2(db, "insert into test values('boo','boo',0);", strlen(querystring)+1 , &stmt, NULL);
if ((rc = sqlite3_step(stmt)) != SQLITE_DONE)
fprintf(stderr, "Error: sqlite3_step() %d. Error Message %s;\n",rc,sqlite3_errmsg(db));
But when I try this query:
"inse...
Hello,
I am trying to set up a list of file names for a parameter to SHFileOperation. I want to be able to concatenate a file name onto the char array, but i dont want to get rid of the terminating character. for example, I want this:
C:\...\0E:\...\0F:\...\0\0
when i use strcat(), it overwrites the null, so it looks like
C:\...E:\......
I'm using the algorithm below to generate quads which are then rendered to make an outline like this
http://img810.imageshack.us/img810/8530/uhohz.png
The problem as seen on the image, is that sometimes the lines are too thin when they should always be the same width. My algorithm finds the 4 verticies for the first one then the t...
Hello
We are working on a C language application which is simple RTSP/RTP client to record video from Axis a number of Cameras . We launch a pthread for each of the camera which establishes the RTP session and begins to record the packets captured suing the recvfrom() call...
A single camera single pthread records fine for well over a d...
Hi,
I was trying to write a small debug utility and for this I need to get the function/global variable address given its name. This is built-in debug utility, which means that the debug utility will run from within the code to be debugged or in plain words I cannot parse the executable file.
Now is there a well-known way to do that ? ...
Possible Duplicate:
Cross Platform C library for GUI Apps?
Is there any crossplatform GUI library for C language? (I mean at least win mac lin) If there is any XML-like GUI editing model, any GUI editing crossplatform visual programms it'l be grate!)
...
I have done far more C++ programming than "plain old C" programming. One thing I sorely miss when programming in plain C is type-safe generic data structures, which are provided in C++ via templates.
For sake of concreteness, consider a generic singly linked list. In C++, it is a simple matter to define your own template class, and th...
Is it possible to integrate flash SWF app into GTK+ as part of Gui and be able to interact with it from your C code? Do you know any examples avaliable for reading there code?
...
My program uses sockets, what Parallel computing APIs could I use that would help me without obligating me to go from sockets to anything else?
When we are on a cluster with a special, non-socket infrastructure system this API would emulate something like sockets but using that infrastructure (so programs perform much faster than on soc...
I'm using and x86 based core to manipulate a 32-bit memory mapped register. My hardware behaves correctly only if the CPU generates 32-bit wide reads and writes to this register. The register is aligned on a 32-bit address and is not addressable at byte granularity.
What can I do to guarantee that my C (or C99) compiler will only gene...
Hi!
I'm totally new in C, and I'm trying to do a little application that searches a string into a file, my problem is that I need to open a big file (more than 1GB) with just one line inside and fgets return me the entire file (I'm doing test with a 10KB file).
actually this is my code:
#include <stdio.h>
#include <string.h>
int mai...
It seems to be an 'accepted concept' in the popular culture of programming languages that 'C is portable assembler'. I have first heard this at least 15 years ago. But when did it really become part of the popular culture?
Note: if you don't agree that 'C is portable assembler', please just skip this question. This question is about ...
I am trying to identify a method for obtaining nearby wifi access points using C in Windows. I am coding in Visual Studio 2010. I have read the necessary documentation but am lacking in guidance on how to implement code that would accomplish this.
I am specifically interested in obtaining the MAC address of nearby access points or at a ...
This is the way I get to prevent funA,funB,funC, etc.. for being used before init
#define INIT_KEY 0xC0DE //any number except 0, is ok
static int initialized=0;
int Init()
{
//many init task
initialized=INIT_KEY;
}
int funA()
{
if (initialized!=INIT_KEY) return 1;
//..
}
int funB()
{
if (initialized!=INIT_KEY) return 1;
//....
I have a project for Linux that i've been developing for some time. Basically it's a bunch of C and H files together with a directory structure and a Makefile.
Every time I need to debug something it's so painful, I need to manually search for var. definitions, structs, etc.
Is there any good IDE out there for Linux that will allow me ...
I'm implementing an FTP-like protocol in Linux kernel 2.4 (homework), and I was under the impression that if a file is open for writing any subsequent attempt to open it by another thread should fail, until I actually tried it and discovered it goes through.
How do I prevent this from happening?
PS: I'm using open() to open the file....
Is there a way to draw many filled circles using one vertex array. Is there a way to draw a circle with triangles? I basically have hundreds of circles far apart from each other that need to be drawn but I feeling calling the vertex pointer for each circle is inefficient. I'd rather make 1 call for all circles if possible. Thanks
...
I'm in linker paradise now. I have a C library which only compiles in Visual C++ (it probably works in gcc) if:
I compile it as C++ code
Define __cplusplus which results in all the declarations being enclosed in extern "C" { }
So, by doing this I have a static library called, say, bsbs.lib
Now, I have a C++ project called Tester whi...
I'm Working in an embedded linux environment.
it launches a telnet daemon on startup which watches on a particular port and launches a program when a connection is received.
i.e.
telnetd -l /usr/local/bin/PROGA -p 1234
PROGA - will output some data at irregular intervals. When it is not outputting data, every X period of time it se...
I'm using OpenGL and was told I should draw circles at each vertex of my outline to get smoothness. I tried this and it works great. The problem is speed. It crippled my application to draw a circle at each vertex. I'm not sure how else to fix the anomaly of my outlines other than circles, but using display lists and trying with vertex a...