UNIX/Linux Programming - October 2012 (Page 2)

ofstream close hangs for large files
 
I'm running a single-threaded application on RHEL 6.1. This process uses a std::ofstream object to log incoming data to a file. Every 24 hours, the file is cycl...
[no replies]
by bievis
NCurses : scrolling a window
 
Hello everybody, I'm trying to develop a terminal simulator, and I had add scrolling functionality, with the wscrl() function and activate it with scrollok()...
[1 reply] : I think you need to call wsetscrreg and idlok also. The man page says... (by codewalker)
by aliprf
play array of bytes in ubuntu
 
hi all I wanna play array of bytes with c++ how can I do that? using "ioctl" or "ioprt" , can help me?
[4 replies] Last: Hello, I Play It... (by RhondaSmall)
by srbbff
Wrap around clock()
 
Hi all, I am trying to measure the CPU time of a program using clock(). But when it takes a certain amount of time to run the code, the time consumption become...
[6 replies] Last: OK, in that case use getrusage() http://linux.die.net/man/2/getrusag... (by ne555)
by Darker
Docs for socket functions
 
Hello, I've just begun creating simple C++ server for linux. I've based my server on example on the internet but now I can't actually find any docs for functio...
[4 replies] Last: Hello, thank you very much, you've helped me to move forward. Now, tim... (by Darker)
how to build my own linux destro
 
hi yall,i wanna build my own Linux OS,but i dont know where to start should i download an already existing destro or what? please help i need the first few step...
[4 replies] Last: lfs http://www.linuxfromscratch.org/~bdubbs/view.php?sysid=418 (by evefree2)
what's the difference between 'ip addr add' and 'ifconfig eth0:1'
 
There are two ways to config more IP addr on a dev: 1. ip addr add 2. ifconfig ethn:m I want to know the difference in source code layer. Following is what I...
[2 replies] Last: yes, on Linux. (by nosecool)
Forked process not returning to terminal
 
Dear All, I wrote a sample c++ program which forks a linux application (kcalc). I compiled this program using g++ and executed it. The kcalc application is l...
[2 replies] Last: > After closing the kcalc application using the quit button I am not g... (by ne555)
pthreads question
 
So I've got a programming assignment that just multiplies two matrices together, and stores the result in a third. Supposed to be done using threads, but I have...
[5 replies] Last: I've used the link that Grey Wolf provided for threading before. Abso... (by MrHutch)
unix programming(memory problem i think)
 
In my program, the parent create processes and the child compute the sum The problem is the parent code so for example if going to computer 1 2 3 4 5 it goin...
[6 replies] Last: Thank You guys Learn one more thing hehe (by shazlin)
Find a solution for invoid the programe coredump
 
Hi , Recently,our program has coredump twice unfortunately. It developed by the c++ and run in the SUSE linux platform. After it coredump,I check and researc...
[2 replies] Last: Did you take a look at the call stack? (by kbw)
by bievis
NCurses : string capture with special keys
 
Hi everybody, i'm developing a small terminal simulator, and I need to capture a string and special keys at same time but i'm not able to capture these special ...
[2 replies] Last: First, thanks for the reply And second, I seem rare than it doesn't e... (by bievis)
Unreachable code in string header (basic_string.h). Why? How can I fix it?
 
Hello community. I'm using g++ with the -Wunreachable-code and the -Wfatal-errors -Werror options enabled to compile a piece of code, but... when I use the...
[6 replies] Last: Warnings are still there with a debug build. Looking at the sources ... (by Germinx)
Sniff stdin
 
Hi, I'm need build a shell-wrapper for logging any input on a shell. The only problem I have is that i cant read stdin twice. My wrapper creates a pthrea...
[10 replies] Last: Were you able to post your modifications to script.c? I don't really... (by ThePsyjo)
by Pooky
Ncurses - two characters
 
Hi guys, I have little bit problems with ncurses. Recently I have to solve problem with non-asci characters and it was really horible. I found many articl...
[1 reply] : getch() gets a char, which represents ASCII range for UTF characters y... (by codewalker)
by vijkrr
ABR for new in purify C++
 
Code : vector<char> ab; //Assume it may or may not have data. size = ab.size(); char* ch = NULL; if ( size > 0 ) { ch = new ch(size); // Purify is...
[2 replies] Last: yes its ch = new char ; (by vijkrr)
unexpected results with ofstream
 
The following file should take the contents of input_file and concatenate it to out_file. But when I run it out_file and the collection (tmpO) file are empty. ...
[5 replies] Last: Ok, thanks Peter. ThingsLearnt++; (by TheIdeasMan)
ios apps
 
so this is a mac question but im in the unix area anyways. so i have an app making book but its out of date. how do i make iOS 5 apps on xcode 4.4?
[3 replies] Last: https://developer.apple.com/programs/register/ (by closed account z05DSL3A)
Script that continually calls a program
 
I'm trying to write a little script that will start up a program, and then start up a new instance of it, and then again, and so on until I tell it to start. I'...
[3 replies] Last: Yes, exactly. (by slumpers)
Thread ID problem
 
Hello In my software, i get the id of a thread when i create it, with pthread_create( &thread , NULL, threadRun, this); curThreadID = thread ; then in t...
[3 replies] Last: yeah sure long curThreadID; int NUM_THREADS=2; void *threadRun(voi... (by kenter13)
October 2012 Pages: 123
  Archived months: [sep2012] [nov2012]

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