UNIX/Linux Programming - September 2012 (Page 2)

Forking question
 
So I have this that is basically a shell. Anyway, if you enter in a & after your command, the command should run in the background, like in a bash shell. Well I...
[3 replies] Last: Yes, hence the wait to simulate the blocking of the running command. (by naraku9333)
by TJF
pthread-problem
 
Hi, I am using a C++ API which doese this: //... pthread_attr_t attr; pthread_attr_init( &attr ); // returns 0 pthread_attr_setdetachstate( &att...
[3 replies] Last: This is the solution - the missing link: pthread_attr_setschedpolic... (by TJF)
Debugging
 
How to debug this code? https://engineering.purdue.edu/OOSD/F2012/Exercises/ex3_skeleton.zip There is a example above but I still don't get it, it would b...
[1 reply] : always : read your code. Make sure that the snips do what they are su... (by ne555)
My calculator isn't working
 
->I'm a 12 year old kid that tried to make a calculator in Linux C++. Here's the code: #include <iostream> #include <cmath> int main() { using namespace ...
[15 replies] Last: I'm confused, what does char addition; char subtraction; char mul... (by closed account N36fSL3A)
by puetti
File streams in distributed mem. environment
 
Hi everyone, my question concerns the parallel I/O safeness of C file streams. In a simple MPI program I do something like this in parallel: int rank ...
[1 reply] : FILE* uses buffered I/O. So there's always an issue when writing. Ho... (by kbw)
segment fault in my stack program using link list
 
i created a stack program using link list when i compile the program its not giving any error but when m running this program it giving error ="segmentation fa...
[1 reply] : Tip #1: Please use code tags when posting code. By not using code tags... (by vince1027)
by samh
can't figure out why there's a runtime error
 
this function is meant to merge two "hands" of cards by alternating both hands into the one hand. CardSet is a class and newSet is passed to the function as an ...
[1 reply] : if (Card ) ¿are you sure that you can go all the way till `a2'? ... (by ne555)
segment fault in my stack program
 
I created a stack program but when i compile this program on g++ compiler its giving a error "segment fault" code is here: #include<iostream> using nam...
[2 replies] Last: thnx a lot kbw (by suchait)
by koba
Auto include header under gcc (for include pre-compiled header)
 
In linux platform, I want to build a C++ project that was developed under Visual Studio 2008. It has pre-compiled header named as "stdafx.h", and it has includ...
[2 replies] Last: Great, I reached the goal! I had been looked for the way by "gcc --hel... (by koba)
by grima
selfmade network monitor
 
Hi, I want to write a small program which I would like to monitor my network flow. Are there any header files or libraries available? Thanks and best w...
[3 replies] Last: libpcap is used by tcpdump, wireshark (ethereal). It's the only porta... (by kbw)
Search a particular string in a file
 
The task is that I need to create a file in which I have to put some text. Then I have to read that file and search for a particular string. If it finds that ...
[1 reply] : You need to read (some of) it into memory and do your search on that. (by kbw)
Integer and pointer
 
Hi everyone, I have a doubt regarding assignment of integer using pointer. 1 :- int_i = *int_ptr1; 2 :- int_i = *uchar_ptr; 3 :- int_j = int_k; 4:- *int_ptr2...
[2 replies] Last: Thanks for reply. May be what you told about 1,2 and 3 is correct.But... (by bibhukalyana)
use of setsid()?
 
Hi, What exactly is the use of a setsid()? I notice that when I call a setsid() in the child's part of code, and run the program and do a 'ps -al' there ...
[1 reply] : If I understand it correctly ps -al will not show session leaders so... (by Peter87)
what do these errors mean?
 
... and how do i fix them? int main(int argc, char* argv ) { switch(argc) { case 1: error("no input files", 0); break; case 2: ifstre...
[6 replies] Last: Thanks for the response kbw. If it interests anyone, here is what I g... (by DeepBlack)
by grima
free an array/pointer after returned
 
Hi, I'm new in this forum and have same questions concerning pointers in C. I have this two functions: int main (int argc, char **argv) { int i;...
[5 replies] Last: hi guys..... To grim,u can use a delete function in the clib,to dele... (by moatatse)
Any suggstions as to start with Linux/Unix Programming
 
I want to start learning programming in this regard, but I do not know where to start and am a little overwhelmed by the amount of options there are. Are th...
[3 replies] Last: the gcc compiler is also the the best if you using linux,ubuntu.i reco... (by moatatse)
Anyone know halix
 
Im trying to get where the user inputs a four digit number and it prints backward. Really could use some help!!
[1 reply] : And also the sum of the four digits! (by techgeek)
Problem with Qt
 
Hi, I tried programming some GUI in Linux with C++ for the first time. Qt4 was recommended to me. Is that a good choice or does anybody have some better altern...
[3 replies] Last: I was working on a number pad for a touchscreen app last night which i... (by Stewbond)
by wr0124
script writing
 
hi, it is possible to write a script which can work as following: run first a c++ code, when this job is finished, then run a matlab code ? how to writ...
[4 replies] Last: it is done ! thanks ! (by wr0124)
Solaris to Linux migration
 
Dear folks we are working on Migrating C++ code from Solaris to linux environment. We are getting some compilation errors. Can U please help me in this... ...
[5 replies] Last: Can't you post the relevant code here? (by Peter87)
September 2012 Pages: 1234
  Archived months: [aug2012] [oct2012]

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