C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

learn more… | top users | synonyms

1
vote
2answers
71 views

Making the keyboard eject switch work

I am using Linux.My keyboard switch for ejecting the CDROM does not work though it displays an eject button on the screen. I need to make it work. I know ejecting a cdrom using system call is as ...
1
vote
3answers
1k views

How to maximize GNOME Terminal on Linux

Environment: Red Hat Enterprise Linux, C language , Eclipse IDE for C/C++ Developers Question: I'm programming a typing tutor which run on GNOME terminal, i want to maximize terminal when run ...
1
vote
1answer
779 views

Using (embedding?) wireshark in a C application for sniffing [closed]

I'm writing a C/C++ application which needs (among other things) to sniff packets and save the output in a file. This file will be read and processed by wireshark after a few days, using a LUA script ...
1
vote
2answers
590 views

when trying to install the watir or watir-webdriver gem on Windows 7 via cygwin, getting long C stack trace with mentions of “W32 socket” issues

When running: $ gem install watir on Windows 7 (cygwin), I get this ERROR: Error installing watir: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb checking for ffi.h... ...
1
vote
2answers
961 views

How can I install GCC on Mac OS X Lion without Xcode?

I find it really hard to believe there is not a simple solution to install GCC on Mac without having to download and install more than 1 GB+ of Xcode. I found a site that helps reduce the amount ...
1
vote
3answers
204 views

Change network settings programmatically without root

I want to change network configurations like dhcp, ip address and so on programmatically. But what I don't want, is to run my application as root. So my question is: What would be a common approach ...
1
vote
2answers
132 views

How to invoke shell script while staying in interactive mode

When I call: execl("/bin/sh", "/bin/sh", (void *) NULL); The /bin/sh/ program is started, which opens a shell in which I can type commands. However, if I call: execl("/bin/sh", "/bin/sh", ...
1
vote
1answer
65 views

How to know on which socket is a processor core?

I have a dual socket 8 core system, 4 cores on one socket and the other 4 cores on the other socket. How can I find, which core is on which socket through /proc/cpuinfo. For example here, on which ...
1
vote
2answers
834 views

How can I automatically lock the screen when idle in CentOS?

How can I automatically lock the screen when idle in CentOS? I would like it so that a user has to re-enter their password once the machine has been idle for a period of time. If there is no option ...
1
vote
5answers
741 views

How do sockets deal with routers?

(Not sure if this should be on the unix stackexchange site...) When I make a socket I use IPv4 and a port number. So if I know both of these, but there's a router set up (on a home network; just ...
1
vote
2answers
82 views

How can code/software access locations in memory that it's not supposed to?

By default, when applications run, they are limited in the amount of RAM they are allowed to access right? Technically my VLC could not access memory addresses used by Chrome. But how is it possible ...
1
vote
2answers
3k views

Problem using 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 2008 box: Faulting application name: sample.exe, version: 0.0.0.0, time stamp: ...
1
vote
1answer
42 views

Cannot compile C programs after deleting libc.a and libc.so

I removed libc.a and libc.so files from my Raspberry Pi. I read somewhere that it was going to fix a problem i had with the mpi.h library, but instead of that it has prevented me from compiling C ...
1
vote
1answer
46 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?
1
vote
1answer
201 views

How to keep Ubuntu 11.10 and Kate editor w/terminal from changing command line when changing tabs?

I am programming C using Kate editor in Ubuntu 11.10. It works great, but when I change tabs in Kate, the terminal line changes to the file path of the tab I click on. Normally this is not a big deal ...
1
vote
1answer
118 views

View C source files (and files in other programming lanugages) in Icewasel/Firefox

How do I make C files appear in the browser's window when I navigate to them on a web page? (I use Iceweasel which should be identical to Firefox.) I don't want to download the file, not open it in ...
1
vote
1answer
135 views

How to run C project in Eclipse IDE?

I downloaded Eclipse IDE for from here and I create a sample project from here I followed steps as above link.But in code displays error in "#include" header file.how do I resolve this issue.Please ...
1
vote
1answer
319 views

How to clear orphaned watch descriptors of inotify

After creating a file descriptor by calling inotify_init() I add thousands of watches to the inotify instance(hope it is right to call that so). My questions is if my program crashes what happens to ...
1
vote
1answer
1k views

unable to compile a kernel module

I tried to compile my first loadable kernel module and failed :( Here is the error: r@ubuntu:/$ sudo make -C /lib/modules/`uname -r`/build/ M=`pwd` [sudo] password for r: make: Entering directory ...
1
vote
1answer
2k views

How to do hardware DTR/DSR flow control on Linux (serial port programming)?

It's possible to setup a serial port communication using hardware flow control with the RTS/CTS pins (CRTSCTS flag for tcsetattr), but there is no way to use the DTR/DSR pins for flow control in a ...
1
vote
1answer
3k views

How to enable daytime service on ubuntu

I have found the following info on my machine user@ubuntu:/etc/xinetd.d$ cat daytime # default: off # description: An internal xinetd service which gets the current system time # then prints it out ...
1
vote
1answer
305 views

Getting CDT as an Eclipse plugin

I've always used Eclipse for Java development. However recently, I've wanted to add other language functionality to my favorite IDE. I got it to work with python and no I need C/C++. A search on the ...
1
vote
1answer
143 views

FFmpeg and reverb

How to FFmpeg can manage audio channels to create effects such as reverb?
1
vote
2answers
3k 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, ...
1
vote
1answer
61 views

How to install gcc 4.4.7 on Mountain Lion

I need to install a specific version of the GNU GCC compiler, gcc 4.4.7, on my macbook, but I'm not sure how to do this. Most places I've found install later versions but I need to install that ...
1
vote
1answer
88 views

How to create an operating system on top of Ubuntu 13.10

I want create an operating system the way Mac did, building a program on top of a Unix operating system. I am planning to make a small operating system with a small amount of functions using C. I do ...
1
vote
2answers
415 views

Building GCC and Binutils on Windows 7 x64

I am trying to build GCC following the instructions in: Building GCC. At the moment I am building binutils but getting the error: * BFD does not support target x86_64-unknown-cygwin. Look in ...
1
vote
1answer
366 views

Valgrind installation errors on OSX 10.8

Hi so I've been trying to Valgrind on mountain lion. I followed the instructions on valgrind's webpage: http://valgrind.org/docs/manual/dist.install.html As well as the instructions on this blog: ...
1
vote
0answers
491 views

How to add “Read & execute” permission in Windows 7 for file on Samba drive

From a C program I would like to add "Read & execute" permission in Windows 7 for a file on a Samba drive. The "icacls" program is used in example below, but a C library call could also be a ...
1
vote
1answer
609 views

How can I get the number of threads running in a process from /proc/[pid]/stat in Linux?

I have the pid of the process. I would like to know the current number of thread running in the process. I know I can read /proc/pid/stat for this information, but I'm not sure how to specifically get ...
1
vote
1answer
4k views

Installing Cygwin C and C++ compilers for NetBeans IDE 7.2

I am very new to Cygwin, C, C++ and NetBeans IDE 7.2. My PC is running MICROSOFT WINDOWS 7 OS. I have read the documentation on how to install the Cygwin C C++ compilers. ...
1
vote
1answer
317 views

How do you add RefocusIt to Gimp?

I'm trying to compile Gimp with a special plugin called Refocus-It. I know that I need to compile something. Can somebody please explain what needs to be done? I would like to accomplish this using ...
1
vote
0answers
315 views

So I stupidly install newlib, and probably overwrote references to glibc. How can I recover glibc?

I forgot to set a make --prefix and I think it wrote to /usr/local/ by default and now I'm having all kinds of errors. I'm on ubuntu natty, what's the easiest way to resurrect glibc. I've tried to ...
0
votes
1answer
94 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
4answers
167 views

Why would a compiled and linked high-level language execute slower than Assembly/machine code? [closed]

Say I compile and link C in to a flat binary or some executable output format to run on a bare machine. If I optimized and fed the direct binary to the CPU upon boot up, why would the resulted format ...
0
votes
2answers
79 views

where's the man pages for sizeof function in c lib?

How come there's no man pages for sizeof c function ? $ man 3 sizeof No manual entry for sizeof in section 3 $ man sizeof No manual entry for sizeof I see man pages for other c functions if I do ...
0
votes
2answers
63 views

Why execute permisiions along with write permissions needed for creating file in c(Linux)?

I am trying to create a file from my c source code on linux. I am using dd command for reading from a file and writing in to a file by creating there. If i don't have execute permissions(I have write ...
0
votes
3answers
725 views

GCC won't work. problem with /usr/local/include

I was trying to add a new library/header and seem to have broken gcc. Specifically, I used the command: $ sudo cp mylib.h /usr/local/include This seems to have replaced the /usr/ directory with a ...
0
votes
1answer
396 views

Voices disappear when using headphones

How do I declare a variable in C? P.S. I have a pair of SteelSeries Siberia headphones. I've noticed that when watching some films the voices are completely silent, yet when I unplug the headset and ...
0
votes
1answer
60 views

Linux/Bash: Comment every line matching a pattern

sed is foreign to me, to say the least. I'd like to traverse a C project tree and comment out every line calling the function LogMsg(). Something that'd achieve the following: foreach: line within ...
0
votes
1answer
337 views

Why i can't run idle in python, while i am connected through putty

here is the the text it shows when I try to run idle: Traceback (most recent call last): File "/opt/epd/bin/idle", line 5, in <module> main() File ...
0
votes
3answers
56 views

Extra file with Same Name Created Automatically while writing a program in unix

Some time while writing a program for example convert.c a file with same name followed by tiled(~) convert.c~ gets created in same directory. why is this so and whats really happening .please explain ...
0
votes
1answer
274 views

Does Windows 7 XP mode support the Turbo C compiler? [closed]

Does XP mode in Windows 7 support the Turbo C compiler?
0
votes
1answer
52 views

How can I have some snapshots of my program? [duplicate]

Possible Duplicate: Screenshot utilities for Windows I have made a program and to make its report I need some snapshots.I found out that the printscreen button does not work in this ...
0
votes
1answer
22 views

Vim inserting C style comments

:command Linecomment :normal ^i/*<ESC>$a*/<ESC> The above command is one that I came up with in order to comment out an entire line in C, normally for debugging purposes and whatnot. I ...
0
votes
2answers
51 views

Issues installing linux drivers from makefile

Since this was more of a software/driver issue I posted the question on SuperUser rather than EE Exchange. I searched around on the net a bit and found a very useful USART to USB converter bridge. ...
0
votes
1answer
67 views

Should I use Python or C for a language interpreter? [closed]

I'm planning on writing a language interpreter for a custom language of mine. The language will work similarly to PHP in that it will be run off of a web server and the code will be executed in the ...
0
votes
1answer
26 views

To run Makefile.tpl in OSX

I have the file here which syntax seems to be near normal make-file with parameter install. I run unsuccessfully make install I get make: *** No rule to make target `install'. Stop. I get the ...
0
votes
1answer
81 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
2answers
858 views

E138: Can't write viminfo file

I'm using ncurses to create a tui to move through directories. I have the program opening editable files in vi using a system call def_prog_mode(); endwin(); sprintf(command, "%s %s", ...