UNIX/Linux Programming - January 2011 (Page 2)

Fork() and Waitpid()
 
Heres my code: int parent=0, child=0, i, result, pid; pid = fork(); switch (pid) { case -1: ...
[9 replies] Last: If you want the variables to be shared, you use threads, not child pr... (by softweyr)
Modifying and Output
 
I'm trying to reading data from a file, which are a set of points x y. Add a third dimension, z, then out put this into a new file in the format: (x y z). The...
[4 replies] Last: Change the name from myfile to fout or something, and all instances of... (by wolfgang)
Calculating the max element of numbers
 
Hello, I am a beginner in C language and I have a question. I have to write a function to calculate the max. elements of numbers, which we put in as input ar...
[4 replies] Last: hello,I'm a Chinese. my english weak. I think the code will solve your... (by liubin5257)
Size of unsigned long and unsigned long long cross platform
 
Hello, I am working on two different machines. One is a Mac with an intel core 2 Duo Processor and other is a quad-core Intel Xeon Processor running Ubuntu ...
[11 replies] Last: [quote=softweyr]usually declared in sys/types.h. kbw in his earlier ... (by PanGalactic)
Linker Errors
 
Hello! I am quite experienced with C, but new to C++, so this is probably something stupid. Whenever I make my code, I receive linker errors-- undefined referen...
[2 replies] Last: If class array_t is a template class, then you need to move all implem... (by jsmith)
error template with C linkage
 
I am using G++ Compiler in LINUX. Why does this section of code causes this error template with C linkage? template <class T> class CObjectCreator : publ...
[9 replies] Last: maverick786us, This is an interesting point and has much to do with... (by closed account z05DSL3A)
by aatwo
communicating with sata device
 
Hey guys.I am going to write a program that can communicate with a hard drive and I have found some good looking drivers for SCSI (sg3_utils) and I am now looki...
[2 replies] Last: Brilliant thanks for the reply. I forgot about hdparam :) (by aatwo)
by gpfs7
creating and writing to a file
 
I created a program that writes data to a file. When i create that file on my mac the file that I created cannot be located. The same program when done on my ...
[3 replies] Last: You also need to check if you have write permission to create that fil... (by modoran)
How do you make gcc stop after the first error encountered
 
Group Does anyone know if there is a switch to g++ to stop after the first error? For example if i get 50 errors about undefined reference how would i get it ...
[2 replies] Last: thanks (by newbie43)
New to LINUX
 
I am a VC++ Developer and this is the first time I am doing C++ under LINIX. I have an existing source code which is interacting with Apache Server. #inc...
[1 reply] : You will want to Google for "Apache Portable Runtime" which is what th... (by PanGalactic)
doubt on fsuid
 
Hi all; i saw a book said this below about file system id In highly specialized circumstances,a program may want to keep its root permissions for eve...
[1 reply] : well, if those files belong to another user, then wouldn't that be inc... (by cran)
Keyboard input emulation...
 
Hi guys, I’m on Debian 5.0.7 and I want to write a simple C/C++ console application that emulates keyboard keystrokes, without using graphical mode (unable...
[6 replies] Last: Glad you got it! I spent the better part of a day messing around with... (by barriehie)
Multiple forked processes and pipes
 
I am new to C++ and, in the interest of disclosure, this is related to a programming assignment for a class. I am not going to ask any questions that could be c...
[1 reply] : This one is what you need: Or should I have 3 pipes (pipe1 parent-ch... (by jsmith)
by Jsel
Best c++ editors? (1,2)
 
My professor is making us do a few c++ projects with bash and I was wondering what editors you guys would recommend. I've heard of editors such as emacs, vim, a...
[26 replies] Last: sounds like another IDE/Editor war. (by sanzilla)
by GnG
Boost Asio File Descriptor
 
Hi all, I'm using boost asio 1.45 (latest version) in my application, this is working fine but I'm having problems with "Too many open files" error. It ha...
[no replies]
using sdl and other libraries in *nix environments
 
Hi, I'm using Ubuntu and in need of direction/help with the SDL library and others... I'm really asking how do you use the runtime libraries... and developmenta...
[5 replies] Last: thanks all.. and i will athar. (by kash kow ken)
by JoR
Linux socket: set initial sequence number
 
Hi everyone. First some background information: It is possible to directly connect two hosts, both behind a NAT if both initiate a connection to each othe...
[3 replies] Last: Thanks but the article doesn't cover the sequence number problem (Does... (by JoR)
catching exception fail in linux
 
hi everybody. i have a problem with linux exception handler. i use this method: double p() throw(){ throw 4; } ... try{ p(); } catch (int a...
[3 replies] Last: you promised NOT throw any exception in p() by write throw(),however,u... (by cheneydeng)
How to give class as argument without making copies?
 
Hi! Such a problem... imagine such a code: class Test1 { public: Test1();//an empty(fake) constructor ~Test1(); Initiate(); // the real constr...
[8 replies] Last: I dunno why are you creating those instances. I need some data to in... (by ne555)
by coders
Convert a given date to epoch time and vice versa.
 
I'm developing a C++ application which is run on linux. I need to calculate epoch time for a given date and vice versa. (no of seconds elapsed since 1979-01-01)...
[1 reply] : The Boost Date_Time library is available on most Linux distros. You m... (by PanGalactic)
January 2011 Pages: 123
  Archived months: [dec2010] [feb2011]

This is an archived page. To post a new message, go to the current page.