C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
1answer
120 views

c programming using school server

I connect to my school server using the terminal. I try to run my main.c on their computer. but I do not know how to do it. Should I copy the files to my school and then run or something else ? ...
-1
votes
2answers
2k views

Netbeans for C++ (gcc 64bit)

How can I make Netbeans work with the GCC 64 bit compiler?
0
votes
1answer
373 views

C programming on Ubuntu

I have problems related to C programming on Ubuntu 12.04. While compiling C program consisting pow I faced difficulties. Then I searched the Internet and got the solution with -lm. But that's the ...
0
votes
3answers
1k views

Error linking standard header file in gcc

I've a simple code - this works on other platforms but does not work in ubuntu. #include <stdio.h> #include <stdlib.h> int main() { int x=99; char str[100]; itoa(99, str, 10); return 0; } ...
-1
votes
2answers
1k views

To write a batch processing script which runs on bash

How to convert your java program so that it runs as a batch program i.e it can be run like a command in the ubuntu or any linux machine. What is the procedure and what are the steps to follow? ...
2
votes
3answers
1k views

What is the write-mode policy that is used in Ubuntu?

Is there anyway to see whether Ubuntu uses write through or write back policy? I know that write back is much better, but when I write a program in C to test the cache, it appears that Ubuntu uses ...
0
votes
2answers
384 views

GUI and C coding gtk files?

I am trying to write a program in C and I need the gtk/gtk.h file, which I both currently don't appear to have nor am I sure how to get it. When I compile all I get is cannot find the file, how can ...
3
votes
1answer
89 views

wait() weird behavior in Ubuntu

I wrote the following program and executed in terminal. But I am confused that the program isn't displaying the results as wait behavior is described on internet. I copied this code from a book. ...
3
votes
3answers
3k views

What is the use of /usr/include directory?

I'm very new to Ubuntu. I'm looking at the directory /usr/include it contains lot of header files. I know they have specified certain constants and other information that are used in Ubuntu. I'm ...
4
votes
1answer
475 views

Configurating man page to work like “man xxx”

I made a application in C. I wrote a manpage for this program and it's called something like edit.1. I "compiled" groff -man -Tascii edit.1 | less Now I can start it like man ./edit.1 from the ...
4
votes
1answer
263 views

What are these files in my /dev directory?

I know that most devices are presented in the /dev directory, but only now have I actually noticed two very strange, yet familiar names in there... I'm talking about stdin@ and stdout@ down there: ...
2
votes
4answers
1k views

.exe file created by C programming through gcc compiler isn't executing

I am using Ubuntu 12.04 on my desktop and Ubuntu 11.04 on laptop. I am writing c program which contains math. I am creating executable file through the command: gcc -o filename.exe filename.c -lm ...
0
votes
1answer
641 views

Unable to use “graphics.h” header file in 12.04

I am new to Ubuntu and I need to write some graphics programs in C which uses the header file graphics.h , but I am not being able to run any of my code without that header file, which is not present ...
0
votes
4answers
1k views

How do I enable a Buffer Overflow?

I just installed 12.04 (WUBI actually) and I wanted to learn a bit about buffer overflow. Unfortunately when I try to use a function like puts() and gets() in an incorrect manner (that is, to cause a ...
0
votes
1answer
210 views

How can I make this evhz.c file to run properly?

I'm really new at linux. I just installed Ubuntu 12.04- I compiled and tried to run a program but it doesn't work and I don't have a clue why. searched on google but no one seems to have a problem ...
0
votes
2answers
994 views

C program runs well in Windows but when run on Ubuntu it is not asking for string?

My simple code for getting info from user & print the same works fine with Windows OS (on Dev C++) but But its not asking for string when run on Ubuntu (tried Terminal/Dev C++ via WINE/Code ...
4
votes
1answer
129 views

Implementation of a slider on appindicator

I'm trying to add a slider to an indicator to port my gnome-shell extension to unity. I found out this question which is exactly my problem. If this is not possible using libido and indicator how is ...
2
votes
1answer
93 views

Can i reasonably link in C code to an application managed with quickly?

I'm looking around for a way to program some gui apps in ubuntu 12.04. I ran across the quickly tutorial and the tool looks fantastic. It looks like the primary language you develop with is python, ...
-1
votes
2answers
5k views

What is the Best Way for Using & practicing C language in Ubuntu 12.04? [closed]

I want to learn C language . and i would like to know how i can practice on C language by using Ubuntu 12.04 And is there any platform for it and how to get it ? or learn it by Terminal and how to ...
0
votes
1answer
272 views

Undefined reference to gdk function

I have a gtk program in which I am trying to call a gdk function. I have the following include files: #include <gtk/gtk.h> #include <gdk/gdk.h> and am compiling with the following: gcc ...
1
vote
1answer
2k views

How to overcome “Permission denied” running C program even after “chmod +x”?

After compiling a C program on Ubuntu 10.10, after executing chmod +x ./a.out, I am still getting bash: ./a.out: Permission denied. How can I run my new executable?
1
vote
1answer
121 views

GTK+ Custom Accelarator Groups

I have successfully manage to add an accelerator to a menu item with the gtk_widget_add_accelerator() function. What bothers me is how i can add a custom accelerator that widget.With the first ...
0
votes
1answer
103 views

Development environment for Linux wireless using sparse

I am used to Eclipse and Visual studio for development for Java and C#. I am looking forward to modify and compile some files in C in the Linux Wireless subsystem. The site recommends using Sparse but ...
7
votes
1answer
7k views

How to make Eclipse CDT's Linux GCC toolchain resolve C++ standard library headers?

In Ubuntu 12.04 LTS I installed the Eclipse CDT plugin and opened the new hello world project to just test everything out. When I was creating the project, I chose the only toolchain: "Linux GCC" ...
8
votes
2answers
7k views

Valgrind does debug error

I have been trying to follow the online tutorial for Learn C The Hard Way. However after setting up valgrind (I followed other links that help setting up valgrind on ubuntu 12.04), when I try to ...
2
votes
1answer
467 views

How can I compile a C program file which I created using the Libre Office editor?

I'm new to Linux and I need some help! I am trying to compile the code taken from this post to the linux-kernel mailing list. I have pasted the file into Libre Office and saved it as pairing_tool.c ...
4
votes
3answers
4k views

Compiling C++ inside a folder in Ubuntu 12.04

I have some question about compiling .cpp inside a folder, it says first.cpp No such file or directory but when I run it in home it compiles. Any settings I might have left out? Thanks. Here's ...
0
votes
1answer
138 views

Unendable question C or C++

Got a question related to programming. I was planning to choose one more language, besides Java, and stuck between choosing C or C++. I am planning to create apps specifically for Ubuntu with GUI ...
3
votes
1answer
749 views

How to let an icon in the launcher wiggle?

Trying to let my python application inform the user by wiggling or shaking its icon in the launcher, I found: Wiggling seems to be the "urgent animation": How can I change the wiggle time of ...
7
votes
1answer
2k views

Installing Valgrind on a 3.x Kernel

I was reading Learn C the Hard Way when I stumbled upon and followed the instructions for installing Valgrind, the C debugger. However, when I ran ./configure to setup build configurations, I got ...
1
vote
2answers
3k views

How to install custom c library?

I just wanted to add a c library to Ubuntu which was created by Harvard University for cs50 course. They provided instructions for how to install the library which is listed below. Debian, Ubuntu ...
8
votes
3answers
18k views

My program cannot run with “command not found” error

I just switched from Windows to Ubuntu 11.10. I wrote the following code in C with the text editor and saved it as HelloWorld.c in Documents. #include <stdio.h> int main() { printf("Hello ...
0
votes
1answer
358 views

Help with tool recommendation, to build a parse tree for C source code

I need a tool that can generate a tree for a C application. like walking through it to build which methods is called
3
votes
1answer
492 views

What does 'webmin' come up in the netstat/lsof listening ports?

I have my own server application in C, I bind my server on localhost address 127.0.0.1 and let it listen in first case on port 10000 and in second case on port 20000. When I run command I lsof | grep ...
0
votes
2answers
623 views

Firewall configuration and consequences

I'm using Ubuntu 11.10. And I want to know something about firewall in Ubuntu, because I want to know if it could be the reason why my application doesn't work properly. Little background: I'have ...
0
votes
1answer
392 views

Write Desktop Background Changer in C [closed]

I am completely new to writing programs for Ubuntu and using the available api. But I wish to write a desktop background changer of my own in C. Are there any api available which would help me write ...
1
vote
1answer
230 views

LINUX and C : What does it mean this condition, and how to install the required packages in order to return true

Using linux ubuntu with metasploit framework, i have a shell script which contains the following lines in the first begining of the file. At first glance i thought that i should install the the ...
0
votes
1answer
724 views

Finding a C struct or header in man pages?

When programming in C, I like to use man sections 2 and 3 to look up the form of system and library calls. But I also often need to look up the form of a struct that is defined in a standard library. ...
8
votes
2answers
14k views

What provides curses headers named curses.h?

I need a few header file namely curses.h for text based programming Please tell me how to install these header files.
16
votes
2answers
35k views

Installing curl.h library

could you help me install curl.h library? I am creating a program that makes use of this C library. I'm on Ubuntu Linux. Thanks.
1
vote
3answers
230 views

How to detect if appmenu is active?

Is it possible to check from the application if its menu will be displayed in the window or in the panel (AppMenu)? I can of course check if the environment is Unity, but some people use AppMenu in ...
1
vote
0answers
275 views

need help compiling SDL as a windows executable on ubuntu [closed]

I'm trying to compile JumpnBump to run on Windows, from Ubuntu and it's giving me a very hard time. Somebody made a port, that I have to compile myself because I needed to change the controls. There ...
10
votes
1answer
402 views

How do I add a slider to an AppIndicator?

I'm trying to add a slider to an AppIndicator similar to what the Sound Menu has. I've looked trough the code of the Sound Menu and found that I should be using libido-0.1 for that. Here's what I have ...
2
votes
3answers
5k views

How to compile c & c++ programs?

I read somewhere that I need to install 'build essential packager' & so I tried: sudo apt-get install build-essential Reading package lists... Done Building dependency tree Reading state ...
1
vote
1answer
194 views

Can't get menus to show up in custom indicator

I am trying to get a menu to show in a custom application written in C. I create the GtkMenu, populate it with GtkMenuItem(s) and add it to the indicator, which shows up in the indicator list, but the ...
5
votes
3answers
4k views

Check if IP is static or dynamic programmatically

I'm trying to determine whether my IP has been statically or dynamically assigned in Ubuntu 11.04 from within C. The closest I've come is examining /var/lib/dhcp/dhclient.leases, but that doesn't ...
0
votes
2answers
1k views

Meaning of “netinet” in socket programming [closed]

What are the meanings of "netinet" and "in" in "#include <netinet/in.h>" ?
1
vote
1answer
489 views

GCC headers on Ubuntu

I was wondering, if there was a go to place to look for c headers, and how to get them on Ubuntu, often times a quick Google search gets me the apt-get package. I was wondering if it possible look up ...
1
vote
1answer
360 views

How do I generate a file with suitable permissions using sprintf() & write()?

#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/stat.h> void main(){ char tmp[12]={0x0}; int i=13; sprintf(tmp,"%11d", i); int fd = ...
2
votes
1answer
623 views

Problem recompiling using make command

I'm trying to modify some C++ files in ns2 and then recompile using make command. Although new .o file is created after make, the output is similar to that of previous C++ file (before modifying). Can ...