Hi all,
I'm trying to fulfill a client request here, and I'm not entirely sure I can actually do it. I have an MFC application that relies upon ShellExecute to open files in their appropriate viewer, which spawns multiple viewers if you try to open multiple files one after the other. If you open one .txt document, and then open another,...
Is there any portable way (on POSIX systems) to determine if a file descriptor is seekable? My thought is to use lseek(fd, 0, SEEK_CUR); and check if the return value is -1, but I'm uncertain if this could give false negatives or false positives. Using fstat and making assumptions about what types of files are seekable/nonseekable does n...
So i am trying to read a text file line by line and save each line into a char array.
From my printout in the loop I can tell it is counting the lines and the number of characters per line properly but I am having problems with strncpy. When I try to print the data array it only displays 2 strange characters. I have never worked with ...
How you use technique described here to work with C structures from .Net?
Ofcourse I need a code example - on 3 parts: C declaring parts, C++ wrapping around C and C# acsessing.
So what I wonder Is
C structture A has as one of its params structure B which consists of at least 2 types one of which is pointer to some variable C which ...
Hello,
I use libexif in my C/gtk+ application. But i want to make it optional. What must i to write in my configure file for to do this?
Thank you
...
I am working on a programming language. Currently it compiles to C. I would like to be able to include parallel programming facilities natively in my language so as to take advantage of multiple cores. Is there a way to write parallel C programs which is cross-platform? I would prefer to stick to straight C so as to maximize the number o...
#include <stdio.h>
int main() {
int c = c;
printf("c is %i\n", c);
return 0;
}
I'm defining an integer variable called c, and I'm assigning its value to itself. But how can this even compile? c hasn't been initialized, so how can its value be assigned to itself? When I run the program, I get c is 0.
I am assuming that the...
Hi,
I have install the C/C++ CDT Version of Eclipse.
After making a HelloWorld.c file and get the code in there I get an error of "Launch failed. Binary not found".
I found in google that my Eclipse miss the compiler and I install MinGW on my computer and add the path to env variables (tested it with "gcc -v" in cmd and succeded).
But...
How can I go back to the very beginning of a csv file and add rows?
(I'm printing to a CSV file from C using fprintf(). At the end of printing thousands of rows (5 columns) of data, I would like to go back to the top of the file and insert some dynamic header data (based on how things went printing everything). )
Thank You.
...
Hi,
I have install the C/C++ CDT Version of Eclipse. After making a HelloWorld.c file and get the code in there I get an error of "Launch failed. Binary not found".
I found in google that my Eclipse miss the compiler and I install MinGW on my computer and add the path to env variables (tested it with "gcc -v" in cmd and succeded).
1) ...
Hi,
Background:
I worked a lot with C#.Net in the last years (Visual Studio).
At the moment I am on a project for iPhones, I use the iTunes MobileDevice.dll and have a lot of reference code in C.
I try to give my best to do it in C#.Net but I give up now and like to change to C.
So I will now rebuild my C#.Net Code, its a WinForm Proj...
I was going through a re-entrancy guide on recommended practices when writing re-entrant code.
What other references and resources cover this topic?
What lint-like tools can be used to check for these issues?
...
So here is libx264 FLV, MP4 and some other format file creators. in each format.c there is function called write_frame(). I want to get a bytearray of what it is writing to file. What shall be added to that functions for tham to return bytearray of what they try to write into file? (I would love to see example for FLV but if it'd work in...
Hi Guys,
how to use the Multiply-Accumulate intrinsics provided by GCC?
float32x4_t vmlaq_f32 (float32x4_t , float32x4_t , float32x4_t);
Can anyone explain what three parameters I have to pass to this function. I mean the Source and destination registers and what the function returns?
Help!!!
...
I used f2c to translate a huge Fortran subroutine into C. The header says the following:
/* fourier.f -- translated by f2c (version 20090411).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you inst...
I have a C program that dynamically loads a .so file at runtime in order to connect to a MySQL database. On an x86 (32bit) kernel this works fine but when I recompile my program on an x86_64 (64 bit) kernel I get runtime errors like this:
dlerror: mysql-1.932-x86_64-freebsd7.2.so::plugin_tweak_products: Undefined symbol "plugin_filte...
which function do i use to give such linux terminal calls in my c program?
...
It could probably be a simple question but I couldn't find a clear answer for it. I have multiple threads in c code and one of them uses select to wait for n seconds. The question that I have is that does it blocks the entire process for n seconds (like usleep) or does select blocks only the calling thread (more like nanosleep).
Thanks f...
I was talking with a co-worker about C and C++ and he claimed that C is object-oriented, but I claimed that it was not. I know that you can do object-oriented-like things in C, but C++ is a true object-oriented language.
What are your thoughts?
Also, it triggered discussion on who decides what it means to be object-oriented and that i...
i'm trying to write a c code which opens the xeyes application and then those eyes keep changing its color constantly for a particular eriod of time..
i tried to achieve this by executing xeyes with one center color, adding a delay of 3 seconds, killing the process, and opening xeyes with another center colour and so on inside a loop.
...