C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. Questions about programming in C are off topic and will be closed or migrated. Consider asking your question at Stack Overflow instead.

learn more… | top users | synonyms

-1
votes
0answers
4 views

Writing Custom Firmware for wireless routers

DD-WRT is a custom firmware that can be flashed to some of supported wireless routers.but unfortunately that is not available for my Router Beetel 450TC1 provided by MTNL,India. i just find out that ...
0
votes
0answers
4 views

Unexpected end-of-file error when trying to open the PSD file with Photoshop?

I have posted this question on Graphic Design site. But I'm not sure if it will get solved, because it is more a software issue than a graphic design issue. If I'm being inappropriate, please edit my ...
-4
votes
0answers
19 views

ffmpeg Read input at native frame rate skip first 5 sec [migrated]

i want to force ffmpeg to skip first 5 sec then set re flag this main code of ffmpeg related static int get_input_packet(InputFile *f, AVPacket *pkt) { if (f->rate_emu) { ...
-1
votes
0answers
27 views

C# Detect global Keyboard Hook [migrated]

Its incredibly easy to write Key-loggers in many languages. It makes me a litter nervous because these small, unknown viruses wont get detected by most(read: all) antivirus'. I'm curious how to ...
3
votes
4answers
2k views

Can ffmpeg encode video from frames of different sizes?

I have a toolchain that produces frames that are usually 1920x1080, but occasionally 1919x1080 or 1920x1079. (Yes, this is a bug. Please read on.) When ffmpeg encodes a video from it, with a ...
0
votes
1answer
43 views

IP address vs. LAN IP address

My modem has an IP address and an internal LAN IP address system. When I want to send something to my PC from a different location (with the function send()), is it possible to give this function ...
0
votes
0answers
13 views

Start Mplayer without extra cmd window (on windows)

I know in Linux it's just (nohup mplayer video.flv >/dev/null &) && exit i want to do the same in windows , start the mplayer from cmd without the extra cmd window ,how can i do it ?...
4
votes
4answers
20k views

“bin/sh: can't access tty; job control turned off” error when running shellcode”

I'm writing shellcode to exploit a buffer overflow vulnerability on a server. To do so I have port binding shellcode that I send to the server and then I run (from a linux terminal) the command telnet ...
0
votes
1answer
439 views

C compiler in command prompt

It is my understanding that the Windows operating system (Windows 7 to be exact) must come with a C compiler because the OS is written in C. How can I access such a compiler to compile my C source ...
0
votes
0answers
25 views

Where can I get Unicast, Multicast, Broadcast and Discard Packets Sent and Received via a particular interface in Unix systems?

I have created several interfaces on my Unix machine for communication to the external world. Now I need to get the count of various packets Sent and Received via each interface. I have already ...
2
votes
3answers
4k views

Playing a PCM file on a UNIX system

I'm trying to figure out how to use libmad with C. The trouble is, libmad converts audio files to .pcm files and I'm unable to find a way to play these files. There is no straightforward .pcm player, ...
5
votes
2answers
9k views

Installing libraries and header files under Ubuntu Linux for C/C++ development

I have to admit that I feel completely lost each time I have to fulfill the dependencies of some C or C++ code. Currently, I'm on Ubuntu 9.10 (Karmic Koala), but I remember the same feeling of ...
1
vote
2answers
5k views

Using this C++ library

I'm trying to use an executable file (written in C) that calls a C++ library. I'm getting this error in my Windows Server 2008 box: Faulting application name: sample.exe, version: 0.0.0.0, time stamp:...
0
votes
1answer
46 views

Unknown option -pthread in LD

This is a follow up from this issue on Github. Basically, on OS X El Capitan, I get this message: ld: unknown option: -pthread clang: error: linker command failed with exit code 1 (use -v to see ...
0
votes
1answer
22 views

libcurl version 7.21 to work on Redhat 6

I am having an issue with libcurl version 7.19 and socks proxy on redhat 6. I believe it was fixed in libcurl version 7.21 how do i upgrade libcurl on redhat 6 to 7.21 or greater?
9
votes
3answers
5k views

Why doesn't '>' redirect error messages from gcc?

I stored the following program in new.c int main() { a; return 0; } It returns an error message. I want to send this message to a file. So I used the following command gcc new.c > ...
0
votes
0answers
80 views

Clion formatting code differently (comments aligned in a column)

Question is about Clion. I don't have enough reputation to put the tag in the question's tags. I have 2 things I need, in order to format code in a different way in Clion, and I can't figure out how ...
1
vote
0answers
23 views

How can I recover my c drive after downloading SQL Server 2014 Express with Tools?

I downloaded SQL Server 2014 Express with Tools went through the entire process but the install file file kept running as if in a loop. I uninstalled the programs and affiliated drivers and now I keep ...
2
votes
0answers
58 views

how is envp argument passed to execve system call?

Suppose I call int execve(const char *filename, char *const argv[], char *const envp[]) where I malloced memory for envp, then how does the program filename access the contents of that array when ...
1
vote
1answer
86 views

The “other” finger (GECOS fields at /etc/passwd)

in the file /etc/passwd we have the so called GECOS fields (which stands for "General Electric Comprehensive Operating System"), that is: username:password:userid:groupid:gecos:home-dir:shell ...
1
vote
1answer
50 views

openSSL Key and Certificate

As far I know, in an authenticated SSL connection, both the client and server have private keys and provide their certificates (with the corresponding public keys) across the connection before ...
11
votes
5answers
2k views

Does linux have any measures to protect against fork bombs?

#include <unistd.h> int main(int argc, char* argv[]) { while(1) { fork(); } } I run this program on my linux, nothing outputs on the terminal, the OS seems go dead. Does linux have ...
0
votes
2answers
147 views

wake computer up when IP is pinged

i want to wake my computer using WoL or a "VTL"(Virtual Tripline). but, because i am on a router with other devices, i cannot use WoL. Then I looked for a Virtual Tripline on google - no results that ...
0
votes
0answers
57 views

prevent asl message to show up on /var/log/system.log

I'd like to define new asl facility in my project, and use it to generate asl log messages that wouldn't show up in /var/log/system.log (but only in the my pre-defined log file) here's my entire asl ...
0
votes
2answers
51 views

Can I sandbox a binary created in C (with GCC) for Linux and make it easy for users?

I have compiled a binary that I want to distribute to other people. It's closed-source, but I want to provide users of the binary with confidence that it cannot possibly access the internet, ...
1
vote
1answer
71 views

How do I install programming info pages in Mac OS X?

I used to have a Linux system i was able to type info libc to view info pages on the C library, including unix functions. However, now I am running Mac OS X this does not work. How do I install the ...
0
votes
0answers
31 views

pnmtopng on large file

I am running pnmtopng on a 101M, 3000x4000 pixel PNM file. I get the error pnmtopng: ASCII decimal integer in file is too large to be processed. every time I run it. I looked through the source and it ...
-3
votes
1answer
305 views

“cannot open port!” in a DLL project [closed]

I made a C Console Application in Visual Studio in order to access one of the COM ports with the following code and all went well. #include <windows.h> #include <stdio.h> #include <...
0
votes
0answers
37 views

Why do these benchmarks NOT saturate the CPU.

I ran two trivial benchmarks in Powershell and C. I ran this on reasonably well endowed i7-2600 with 16 Gig Win 7 Pro. Both ran using two of the 8 cores (really 4 cores dual hyper threaded) and ran ...
1
vote
1answer
66 views

Application server for C programs?

I'm writing some programs in C that will run in a distributed environment. Is there anything like an application server for C that provides clustering, monitoring, logging, etc?
0
votes
0answers
45 views

Building software on Arch and finding the dependency

I'm relatively new to compiling software. I downloaded a package called gr-scan which uses gnuradio and osmosdr (I have both installed and working via pacman already). The instructions say to edit the ...
0
votes
1answer
51 views

How can I add a flag in PostgreSQL source code that works in both frontend and backend?

I'm trying to do some changes to postgresql source code. I want to add a flag that works in both frontend and backend. Here is what I have done so far. 1- I created my header file mine.h in which I ...
0
votes
1answer
80 views

C programs stuck

After installing windows 10 a couple of month ago i tryed to run a very simple C program, firtsly in Visual Studio 2015, and the entire IDE froze. Then I tried compiling via command line. The build is ...
0
votes
1answer
35 views

How can I program and debug c code on Fedora? [closed]

I know that in order to compile c on fedora I need to use gcc, but what about debug? How can I debug c on Fedora? What IDE can I use?
1
vote
2answers
49 views

What is the difference between working on a machine and doing the same task over ssh?

I have been working at University on a local machine which is on a server that I have access to. I have some c code and am able to carry out parallel runs of the code as expected. However when I ...
1
vote
2answers
427 views

Unable to compile GTK+ application

I'm trying to compile a simple GTK app for testing on a Trisquel 7 machine. The packages are derived from Ubuntu 14.04 LTS. I have libgtk2.0-dev installed, but when I try to compile, this is the ...
0
votes
1answer
206 views

DD-WRT calling web service from Arduino ESP8266

I am looking for a way of finding out what devices are currently attached wirelessly to the router thats running DD-WRT firmware. Problem is that I am unable to find any references to a REST API or ...
1
vote
2answers
139 views

Upgrading gcc for a specific user account

I work on a computing cluster running CentOS6/RHEL6 that I share with ~100 other users, overseen by a single IT admin. Recently, I started writing in C++, and some of my code depends on C++11. ...
0
votes
0answers
31 views

Slow IPC in 4000+ processes

I have an multiprocess application that is dependent on IPC calls. We have around 4000+ processes running. Currently we upgraded the system to RHEL 6.4, and now are observing that IPC calls msgrcv() ...
2
votes
2answers
440 views

What does this macro mean in linux kernel code?

see i found one config file in which this are macro defined # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADP5588 is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT2160 ...
6
votes
2answers
7k views

NetBeans + MinGW + C - file not found

I have installed NetBeans 7.3 (twice this day), and installed MinGW (many times today). My OS Win 7 64 I tried to install MinGW with MSYS, tried MinGW with MSYS and MinGW DT, MinGW without MSYS, ...
2
votes
1answer
751 views

Geany comment block format

I'm trying to figure out where the comment block style is defined in Geany for C files. By this I mean when I select a block of text and hit ctrl-e, each line in the block of text is pre-pended (at ...
1
vote
1answer
33 views

Setting up quarantine environment on Linux or Mac

How can I setup an quarantine environment so that I can test my codes or programs which can fork any number of times? I was trying this on Mac and if I have a fork in a while loop which is not ...
0
votes
1answer
28 views

A Linux Distribution w/ Version which contains Sendmail version 8.6.9

I'm looking for Sendmail version 8.6.9. What distribution (I don't think that matters) or version of said distribution contains the old 8.6.9 version of sendmail. If I'm going about getting that ...
0
votes
0answers
182 views

build numpy from source results in wrong architecture

I build numpy from source on my mac to link it to my ATLAS library. Thus, I wanted to run it as described here with these options: export MACOSX_DEPLOYMENT_TARGET=10.10 export CFLAGS="-arch i386 -...
0
votes
1answer
166 views

BASH script that generates a header file with function prototypes

I am doing a C project which involves lots of static linking. To get rid of "implict function declaration" errors I will use a simple solution - a header file with function prototypes. I wrote this ...
0
votes
2answers
229 views

Need advice with making a customized linux distribution (From scratch or pre-existing distro?)

I'm working on an application on a bootable USB drive that runs at startup (doesn't give the user access to anything but this program). I figured I'd utilize an existing distribution, strip it of ...
0
votes
1answer
70 views

How to prevent GNU indent from breaking initialization assignment like “= { 0 };”

See following example. $ indent --version GNU indent 2.2.10 $ cat foo.c void foo() { struct { int a; int b; } v = { 0 }; } $ indent -st foo.c void foo () { struct { ...
2
votes
1answer
93 views

Does a better/newer C or C++ compiler produce more performant compiled code? Or do they just perform faster/better while compiling?

I am not a C or C++ programmer myself, but I often use software that needs to be compiled or otherwise depends on a compiler, like some R packages. Will that software actually perform better if I use ...
0
votes
2answers
68 views

Adding trec format tags to thousands of file

I need to add tags like text of file in thousand of files in a directory and I tried it using cat and outputing it to a stream of file using for file in * do cat ../gau > temp; //gau contain ...