UNIX/Linux Programming - April 2015

Stopping program on server from ssh client
 
I have a Linux server that I control through ssh client Putty while Working on Windows machine. I'm ready to upload an application to my server, however I need ...
[1 reply] : That depends on how you started it. If you have it running in the bac... (by koothkeeper)
about dining philosopher problem
 
i am self-practicing this problem right now, and wanna know about how to use c++(in linux) and using the conditional variables provided by the pthreads api.(usi...
[4 replies] Last: To rewrite this code in c++ and have the above features. Therefore, ju... (by mkchantony)
getting library to run on ubuntu 14.04
 
Hi, I'm trying to make this https://github.com/andrewprock/pokerstove#building poker library to run so it could be included and used in a simple .cpp file o...
[4 replies] Last: Tnx a lot for your effor man. This is not making 100% sence to me righ... (by etrusks)
WC program
 
Good day to all, So, I`m supposed to test this word counter program: #include <stdio.h> #define IN 1 #define OUT 0 /* count lines, words ...
[5 replies] Last: Let me suggest some boundary conditions that may be useful: - empty fi... (by dhayden)
by koxp
Documentation about a Code ( Threads)
 
I have a code but i dont understand it. Can someone explain me what happens in the code? #include <stdio.h> #include <stdlib.h> #include <pthread.h> #incl...
[2 replies] Last: It appears to count prime numbers up to some limit called maximum. It ... (by dhayden)
by FaanP
Embedding Python in C++ using classes
 
Hope you guys can help. I searched and googled but could not find a solution. Firstly my code: Main.cpp #include <iostream> #include...
[no replies]
<iostream> error in gcc and g++
 
I have the code below. I have tried compiling with gcc and g++ to no avail. For gcc it gives a fatal iostream error. For g++ it throws a huge list of errors. I'...
[2 replies] Last: Always start with the first error in the list. Often one error will ma... (by Peter87)
Help me to read a file but do not read the last line.
 
There are two files. The first file(name is filedata1.dat) content is : 1 3 8 9 3 6 9 2 2 ...
[4 replies] Last: hello keskiverto: Thank you for your reply. I have found a me... (by wzktwang)
by AG123
replace commas with spaces
 
I am reading in a file but i need to replace the commas in the file with spaces without changing the txt file that was read. I was wondering if anyone had any i...
[1 reply] : When you read, you must store in a variable what you read. Change the ... (by keskiverto)
Static library dependency
 
Hi. What command would you use to find the object files, static library libc.a depends on in /usr/lib is it whereis libc.a or ldd /usr/lib/libc ldd libc.a...
[2 replies] Last: thank you (by csstudent123)
The weird problem using void alarmHandler(int signal_number)
 
I am writing an "void alarmHandler(int signal_number)" to register the signal SIGALRM. The handler is : void alarmHandler(int signal_number) { static i...
[1 reply] : post a minimal snip that does reproduce your problem (by ne555)
Error in file reading
 
Guys I made a program to split a file into 11 different files based on the word length of its content. The file I'm reading my data from contains 354986 words b...
[2 replies] Last: Oh! I took That input but forgot to use it. Thanks for finding the mis... (by Pter0dactyl)
by Gyiove
Multithreading having terrible times on linux.
 
Hello everyone! I managed to get this mutlithread working on windows just fine. I'm not sure how well is my code but in linux however... I can only create ...
[6 replies] Last: That was my idea and now i understand that it can not be done that ho... (by Disch)
piping to script
 
$ ls -la | myScript.sh How can I using sed do the following? 1. Total number of lines read. 2. Total number of different users (owners). 3. Total numbe...
[4 replies] Last: thanks (by csstudent123)
Build kernel
 
Hi everybody, For completing my assignment, I have to add a file named "number.txt" to the kernel. This file provide a number as a data for debugging source ...
[no replies]
Check output from the commend problem
 
I want to check the output from the commend and print out different thing I did successful print out when there are few line from wc *.cpp | ./test -l but when ...
[no replies]
Program run perfectly without error but cant show anything
 
This is my program,what I want is do this program to check how many bytes,lines and words inside any of the file. When I type wc test.cpp it will pop out 6 ...
[2 replies] Last: after I type wc test.cpp it will pop out the 3 num and 1 file name,exa... (by guankin)
Control Optimization Problems
 
Hi, I'm compiling my program using various optimization options. I noticed that whenever I compile my code using -O0 optimization, my program runs fine, and pr...
[11 replies] Last: But this thread is trending away from the purpose of me posting my qu... (by Alrededor)
NCurses alternative
 
Hey, I was wondering if anyone knew of an alternative for NCurses for C++, I know you can use it with c++ but it's based on C and forces you to use it. Its tedi...
[3 replies] Last: You're welcome! I'll check when I get home today; however, I think th... (by koothkeeper)
Compiler for mac os
 
Hello, I just tried using Mac for programming, I need to find a compiler. When I tried ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/...
[19 replies] Last: why not just use clang? and i believe the proper exe name would be g++ (by Little Bobby Tables)
April 2015 Pages: 12
  Archived months: [mar2015] [may2015]

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