UNIX/Linux Programming - November 2012

[MAC] Get current keystate
 
Hey, I'm trying to make a basic keylogger on my Mac to pull a prank on my friend. Anyway, I need to get the current keystate, and the application should be runn...
[no replies]
Shell Script
 
Hi I am trying to make a shell script in the Ubuntu terminal that can read a password for the text file and shut down the computer automatically after 2 or 3 ho...
[1 reply] : man sudo && man shutdown (by Athar)
Need help with setting env variable inside system call
 
I have two processes. I want to set an environment variable in one process and check it in another in my C program. //process 1 if(count> 1) { sys...
[1 reply] : Environments are inherited, it's not a global resource. The two apps ... (by kbw)
by Katma
SegFault before main even runs?
 
I'm getting a segfault before the program even gets to main. It compiles just fine, but not beyond that. Here's the program. I cut out the functions to find...
[4 replies] Last: I'm using the compiler built into my school's csc server. Linux clas... (by Katma)
using pipe
 
Please, help me to understand how to use pipe!! I write the console application under Unix. Here is the text: char buff ; FILE *stream; str...
[no replies]
Difference of calling external application and library
 
Hello, is there any difference in regard to attributes and autorization between calling an external program out of a C++ application or calling a library fun...
[1 reply] : If your application is running as root, anything it does is done as ro... (by Zaita)
delete uesr
 
how can i delete some users from terminal
[2 replies] Last: that's right!!!! (by cherraqi)
by Ritu15
Makefile
 
please tell me the code of make file for my following program.... tha Employee.cpp file is #include "Employee.h" Employee::Employee(){} Employee::Employee...
[3 replies] Last: You should put the dependency (by ne555)
by Ace93
Ostream&
 
Editing code for class and i get the error: basic_demo.cpp: In function 'void print(std::string*, int, std::ostream&)': basic_demo.cpp:72:54: warning: default ...
[4 replies] Last: I've tried: 26 bool add(std::string arr , int &n, int maxN, std::str... (by Ace93)
Detect mouse click in Terminal (Ubuntu server)
 
I want to solve a pretty easy problem. I just want to detect a mouse click under Ubuntu Server(without GUI respectively windows management). Therefore, I use Nc...
[3 replies] Last: ertt (by IraMelton)
api and g++
 
so I have to use an api for this project and I guess I am to get a .so for the library. I have been using g++ and command line to compile this project. My quest...
[2 replies] Last: Have you tried Google? http://ehuss.net/shared/ (by kbw)
Setting a value of nested class in shared_ptr
 
I am trying to use a vector of shared_ptr (boost lib) that points to a class with a nested class (hope I got all that right). So far I have: typedef boost::sh...
[3 replies] Last: @deadpickle (aside) if you're doing the allocation and copy just to ... (by andywestken)
I need chars!
 
I'd like to make a mapping of strings to chars. I'm going to use a hard coded map in a program to compress data. Something like this: a = "str1" b = "str2" e...
[1 reply] : I don't clearly understand what you intend to do, but you can use a l... (by tejashs)
by gliese
Is there anyway in which I don't need to specify the linker when compiling?
 
For example, If my c++ code included math.h so that I can use sin() . When I compile my code, I need to add the linker, that is : g++ main.cpp -lm ...
[3 replies] Last: You can use a Makefile ! (by SKZ81)
by Carnez
discrepancy with multiplication
 
I am using the armadillo c++ linear library and when I try to multiply a scalar with a vector, I receive different values each time. Any suggestions on the issu...
[1 reply] : You should post more code. - freq declaration and initialisation - how... (by SKZ81)
by raduh
Declaration syntax error
 
I wrote the following library for my mouse: #ifndef __MOUSE_H #define __MOUSE_H #include <dos.h> #define LEFT 1 #define RIGHT 2 #define CENTER 3 class M...
[2 replies] Last: - Are you compiling in EFFECTIVE C++ mode ? - If yes, try to rename to... (by SKZ81)
Linux-friendly laptops
 
I know it's more of a hardware-related question but are any particular brands more linux-friendly/compatible than others? I'm thinking HP, Sony or Samsung but t...
[12 replies] Last: I have an older Macbook with Intel dual core processor that Apple no l... (by powerup777)
Am I using threads right?
 
So I never program with threads, and for some reason they just confuse the hell out of me when trying to use them. Anyway, I have an assignment that passes a bu...
[8 replies] Last: It seems to try and teach you how to start threads, not make it in a, ... (by liquidfuzz)
Read ini files
 
Hi. Windows API has some functions for reading *.ini files GetPrivateProfileString GetPrivateProfileInt Is there something similar in linux? or maybe wi...
[5 replies] Last: I apologize, that was my mistake, I hav to say you can use! (by barbodar)
Need immediate help on casting/storing values in buffer
 
I have a structure type, let's say Telephone typedef struct { string dir_no; unsigned char msg_ref; }Telephone; //I create a pointer to it...
[2 replies] Last: Thanks a lot Moschops for a quick reply. Actually the structure is muc... (by incognito)
November 2012 Pages: 12
  Archived months: [oct2012] [dec2012]

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