UNIX/Linux Programming - January 2013

by vijkrr
How mutex works?
 
F1() { lock(&A); dosomething() releaselock(&A); } F2() { lock(&A); dosomething(); releaselock(&A); } if Thread 1 is c...
[3 replies] Last: Let's make it look more like C++ F1() { lock<mutex> lk(A); d... (by Cubbi)
by KianS
Basic C++ Compiler for Mac (I don't mean a BASIC compiler)
 
Hi I'm Kian (probably the worst way to start a post) I am new to programming and need a simple c++ compiler. One not too advanced to make simple programs. Pl...
[4 replies] Last: Please don't comment with Xcode because I don't get it, if you do com... (by Lodger)
by Telion
Writing the ultimate makefile
 
I'm trying to write a makefile that, given a list of source and header files (or just *) and compilation flags, automatically determines the dependencies of eac...
[8 replies] Last: www.cmake.org -> CMake builds make files for you depending on argument... (by Zaita)
by elfico
Linux/Unix
 
hello everybody. pls can anyone tell me where I can get materials that would help me to learn unix/Linux? Thanks.
[6 replies] Last: You could always buy a Raspberry Pi computer for less than £30 learn ... (by ajh32)
shell in c++ with classes
 
I'm writing a Shell for my Operating Systems course. It should be written in C++ using classes. I have no idea how to start. How to describe for example "ls" c...
[1 reply] : The shell shouldn't have too many built in commands, ls especially. I... (by kbw)
Makefile/linker question
 
I have been googling around and either my google foo is weak today or there isn't a clear cut answer to my question out there. I've got a few libraries that ...
[4 replies] Last: $ make --just-print (by ne555)
using a vector and fstream
 
#include <iostream> #include <stdio.h> #include <vector> #include <fstream> using namespace std; int main() { vector<string> filenames; string file = "test...
[1 reply] : In C++98 (from 1998) the constructor for std::fstream accepts a con... (by Catfish3)
Address of Pointer is fixed in every execution
 
Hi In my program address of pointers is fixed in every execution. for example: pointer A is "0x624f40" in every execution. I did not find any reason for th...
[5 replies] Last: Programs get loaded at the same base address, mostly. And that causes... (by kbw)
killed
 
Hi, I am subhamita. After running 2000 iteration correctly, my program is stopped showing 'killed'. What is the problem in the program? please help
[2 replies] Last: Same problem as http://www.cplusplus.com/forum/windows/90030/#msg483... (by closed account z05DSL3A)
[Ubuntu] How to determine the size of unity launcher/panel
 
I'm having an issue calculating the size of my window on Ubuntu. I am using gtkmm-2.4 and calling Gdk::Screen::get_monitor_geometry to determine the size of ...
[1 reply] : Check with the GTK && Unity documentation or forums, that is a problem... (by Zaita)
by efe909
posix mutex
 
Hi, I am learning multi-threaded programming (C++) using POSIX libraries. I have been using the mutex's perfectly well yet I want to clarify something. In almo...
[4 replies] Last: [quote=efe909]" access to variable myVariable is not really "locked" i... (by closed account zb0S216C)
by anibio
compiling C++ with the scons compiler
 
I am using Mac OS X 10.8.2 and I am compiling my code using the scons compiler. I am using the 32 bit xerces-c database version 2.8.0. when I am trying to b...
[1 reply] : Wouldn't it be easier to install a 64-bit version of libxerces? (by fafner)
skgesigOSCrash crash in the Linux 32 bit application
 
Dear All, I am getting following crash in our 32 bit C++ application built on RHEL5.4 with Oracle version 11.2.0.2. Program terminated with signal 6, Ab...
[3 replies] Last: 1. Your Oracle Diver 2. http://www.cplusplus.com/articles/jEN36Up4/ (by Zaita)
GUI API
 
does Linux have a native library for GUI. I'm asking for like a windows.h type of deal but w/ Linux. if anyone knows one is it easy
[7 replies] Last: Thanks for that. My main interest in XLib is just curiosity rather th... (by closed account z05DSL3A)
EOF doesn't flag to POLLIN?
 
I'm thinking cause POLLIN only watches for bytes incoming. And I can't do this... int poll_activity = 0; while(poll_activity==0){ poll_activity = (poll_socket...
[6 replies] Last: Found it, rather than put 0 as a timeout, I should put -1 for blocking... (by LuckyIsDog)
memory alignment
 
Is there any way to align memory allocated with new to a 2d array?. how can I aligned memory allocated to a 2d array or totally allocated to an object or array ...
[4 replies] Last: If he was not worried about alignment, he could as well coded it in Ja... (by rapidcoder)
System function
 
I know its looked down on but does anyone know if I can use the system command on a Linux environment for example can I do this #include <iostream> #includ...
[1 reply] : Yes you can use system(""); (by Zaita)
by pjesh
Hashing - How to find collision rate?
 
Guys, I'm having issues calculating the collision rate of this table. It's currently printing out values same as the number of elements inserted. Any ideas? ...
[2 replies] Last: Thanks. That solved the problem :) (by pjesh)
by shafh
Can build my code on another linux-pc
 
Hi everyone. I have currently coded a program in c++ on one (ubuntu) computer. The program works fine (a few warnings, but nothing else). I now try to buil...
[5 replies] Last: Wow that was amazing. A easy bug. Really thanks a lot. Would never ha... (by shafh)
static member problem in overloading delete operator
 
I defined my pool class(memory pool manage) as a static member in foo class as below but give error error : undefined reference to `foo::mem_' on operator de...
[3 replies] Last: You should put it inside one of your source files because you only wan... (by Peter87)
January 2013 Pages: 12
  Archived months: [dec2012] [feb2013]

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