UNIX/Linux Programming - February 2013 (Page 2)

by siloan
Tcp socket (1,2)
 
Hi there, i'm in a situation with a server-client issue, the connection is made packets are sent/received but if server restarts then the client must be also re...
[22 replies] Last: I had tried the same test with the same function but adapted for udp d... (by siloan)
First linux program
 
I'm starting my first Linux program and I cant really figure out how to start something like this. I'm not familiar with /proc or any linux commands and the pro...
[2 replies] Last: /proc is kind of cool. I don't think so. The good thing is that you ... (by kbw)
SFML help
 
i wanted to use networking and i knew sfml let me do that so i downloaded sfml cd'ed (it was on my desktop) to it in terminal and typed in sudo make install lik...
[3 replies] Last: Then your lib is not installed properly, there must be some specific f... (by siloan)
ncurses colors
 
hi all! im writing a program with ncurses on ubuntu. ive gotten almost everything down where the library is concerned. the only problem is colors. i cant find a...
[1 reply] : I think this tutorial is very good. http://www.tldp.org/HOWTO/NCURSES-... (by Peter87)
(n)curses.h help
 
I am trying to write a program with either curses or ncurses, but ive tried using both and the terminal says it cant find either of them. i am using ubuntu 12.1...
[5 replies] Last: never mind i got it (by closed account Dy7SLyTq)
get specific format files in directory
 
This is C code to get all the file names in the directory. Here I want to only specific format files. Format example I would like to list out only .txt files . ...
[2 replies] Last: Agreed, you need to parse d_name. In your case, you need to match the... (by kbw)
Recursion problem solution not clear
 
Hi every one, please any one can explain following program output . #include<stdio.h> int func(int *a, int n) { if(n ==0) return 0; else if...
[1 reply] : 1) func(a,6) calls func pointing to '12', indicating there are 6 elem... (by Disch)
by souper
Fork & Children Processes
 
The fork() function is a little fuzzy to me. Particularly when you have if/else statements like the one below: if(fork()) printf("I'...
[5 replies] Last: Thanks kbw, that helped. Believe it or not now I am having trouble wit... (by souper)
by sangvv
Diffrent speed in UX and Linux
 
Hi all, I have small project have two thread. Thread one put message to queue (lock – put – unlock) Thread two get message from queue (lock – get –...
[10 replies] Last: @rapidcoder of course he is locking access to the container, it's mu... (by rapidcoder)
How to implement editable text objects(photoshop/gimp/inkscape like text tool) in goocanvasmm using gtkmm3?
 
I am programming with gtkmm3 and goocanvasmm. How to implement photoshop/gimp/inkscape like editable text objects(text tool) ? After clicked text tool, a cursor...
[no replies]
Sentinals and I/O redirection.
 
I am doing a homework assignment for my class and I keep getting stuck. I have been staring at it for hours. This is the code that I have: /***************...
[1 reply] : If your confusion is with I/O redirection, that is not a problem. All ... (by Smac89)
how do i make parent directory, sub dir, then files at once?
 
the book says to use mkdir and touch to create a directory called "Unix1b" within my home directory with the structure at the following A book that i bought...
[4 replies] Last: I guess pnoid answered your question then mkdir -v Unix1b; cd Unix... (by Smac89)
The exceptions are not being caught.
 
Hello, Looks like that none of exceptions are being caught. e.g. if I run a code below it will not fall into any of catch. I use gcc 4.6.3 on Ubuntu 12.0...
[4 replies] Last: Thanks guys, I got it now. (by vincegata)
.so Files Question
 
I apologize if this isn't directly related to C++, but I was wondering if .so files work like .dll files. As in, if I have a library that builds dynamically, I ...
[4 replies] Last: Supporting one distribution is beyond easy. Supporting multiple is wha... (by closed account S6k9GNh0)
Using stat() outside of main() - getting incorrect info
 
For a project, I am use to write a programs that the user provides an inode number and the program returns all information on that file. (OS: Back Track 5 using...
[1 reply] : struct stat sb; printf("FILE:\t\t\t%s", file); printf("FIL... (by Cubbi)
linking error, undefined symbol
 
Hi!! i'm writing a source code for extending Snort IDS. What i have is a source and a header file. In my source file, at some point i want to use a function th...
[3 replies] Last: tryuterrrgtry675 (by FrankWurm)
by souper
Badly placed ()'s
 
Hey guys, This is my first post so bear with me... In Linux I am writing the simplest c++ program just to make sure everything can execute before writing...
[4 replies] Last: Try this: #include <iostream> #include <string> #include <sys/types.... (by Galik)
Segmentation fault (core dumped) when using clone() system call
 
I'm trying write small test code using clone() system call. /* * test.c */ #include <stdio.h> #include <stdlib.h> #include <linux/sched.h> struct shared_da...
[5 replies] Last: You may find this article useful. http://www.linuxjournal.com/article/... (by kbw)
Best Make System
 
Hi I do a lot of programming in C++ on the windows platform, and I do a lot of Java on the UNIX platform. Now I want to start writing and porting some enter...
[11 replies] Last: Thanks. (by kbw)
Bitwise shift operation
 
Hi everyone, I want to know what happened internally in bitwise shift operation. What happened when i execute the below statement ? value >> 10; ...
[1 reply] : The hardware can probably do value >> 10 in the same time as value ... (by Peter87)
February 2013 Pages: 123
  Archived months: [jan2013] [mar2013]

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