UNIX/Linux Programming - August 2011 (Page 2)

Does the exception "std::bad_alloc" mean that the system memory is out?
 
Does the exception "bad_alloc" mean that we don't have enough memory left? Can any other problem trigger this exception?
[4 replies] Last: To add to the above, another problem that can trigger this exception i... (by m4ster r0shi)
by nanger
mutex lock destroy on APUE
 
struct foo*fp; pthread_mutex_lock(&fp->lock); if(--fp->count==0) { pthread_mutex_unlock(&fp->lock); //if some other thread modified count, what wi...
[1 reply] : You mean after the unlock? Nothing. What's supposed to happen? Althoug... (by Athar)
by VilleA
GTKmm segmentation fault when calling other function with void*argument
 
Hi there, Now, I have to say that I have no clue what's happening here: #include "window.h" #include <gtkmm/main.h> void itseikkunatesti() { int a...
[2 replies] Last: thanks, works now! Just passed the main arguments on to the function. ... (by VilleA)
Sorting a List of type string
 
Hi everyone, I have a list which contains strings. The strings contain dates, and are of the form "12 March 2011". I want to find a way in which I can sort t...
[2 replies] Last: Whatever you do, it would make sense to write a function that parses t... (by andywestken)
by gianc
ioctl and TIOCSRS485 problem
 
I have to set my serial port for a rs485 serial comunication but when I use the ioctl function I have an error, this is the code: struct serial_rs485 rs485co...
[4 replies] Last: the struct is so defined struct serial_rs485 { __u32 flags; /* RS48... (by gianc)
createing mini editorin c c++ linux
 
how to Write a program for a mini editor which allows the the following operations: Insert lines, delete lines, edit lines (adding words, removing words). Each ...
[6 replies] Last: Sorry! The description is quite vague (to me), and as I know nothing m... (by andywestken)
by VilleA
sigc::mem_fun / GTKmm question (pointers and classes)
 
Hi, And thanks in advance if somebody is able to help me. I am using Ubuntu and wanted to do GUI, so I went for GTKmm. My whole project is now about 6 differe...
[6 replies] Last: Thanks a lot! It works. I appreciate the help! (by VilleA)
Using the include with quotations in shell
 
Hey, I'm wondering if i can use absolute paths or even relative paths with my include double quote statements for my source files. as in #include "/home...
[1 reply] : You can use absolute and relative paths. (by Moschops)
by tition
C++ via CGI: how to set ignore user abort() ?
 
Hi all, I have a C++ application that is hooked up to an Apache server via GET and POST methods (and creates .html via std::cout ). The Apache cgi-script c...
[2 replies] Last: Thanks for the advice! The references you gave me worked just great! ... (by tition)
Using execvp() and fork()
 
For the life of me, I can't get this program to run. I tried this first on MS Visual Studio only to realize there are no fork and execvp on Windows. Then using ...
[1 reply] : http://www.cplusplus.com/forum/general/46540/ (by Catfish)
makefile error..
 
Hello, I have just downloaded a c++ package called TSNEAT, which is compiled with this makefile. However, when I run it using make in ubuntu, I simply get ...
[6 replies] Last: Oh right, so I should be executing those instead of the makefile.commo... (by ausairman)
How to CGI C++?
 
Hi, I have a project with about 30 files mostly .c files written in C and live on Apache webserver /Unix, which are nothing but CGI programs responding to Web ...
[1 reply] : A .sln is a solution file for Visual Studio; There's no such thing* in... (by krakissi)
Makefile Backup Target
 
Goal: I'm trying to create a PHONY target inside my Makefile so that when I run the command "make backup", It will move all the files that end in "~" into th...
[2 replies] Last: ¿what does the '@' at the start of the line? hides the command so t... (by Xploitz)
by rudy01
crossing between Linux and Windows and Mac
 
Hi, I have a very simple c++ code, and it is using all standard static libraries, which I believe are all defined on Unix/Linux and Windows. I have developed...
[4 replies] Last: As kev82 stated, without using a cross-platform compiler, you would ha... (by shacktar)
Eclipse SDL Symbols could not be resolved problem.
 
Hey, I normally don't work in Eclipse but I'v been asked to deliver some of my work as a eclipse project. And I'v started to working with it a bid. After...
[1 reply] : I ran into this similar scenario with STL libraries when using the QT ... (by Don Gosnell)
by texus
reboot computer, but save all data
 
I am relatively new to linux and I was trying to write a program that reboots the computer. I tried using system("reboot") and also with shutdown or init, but ...
[4 replies] Last: That won't help much because I am the only user on the computer (I sho... (by texus)
TCP/IP packet "pass thru"
 
Hi, I'm currently new to C++ and I'm working on a small project of mine. What I'm trying to achieve is this: A client attempts to connect to the server...
[2 replies] Last: What kooth suggests is a star shape network. You may want to take a lo... (by h9uest)
by mgm11
first time user of strtol
 
hi i have to use strtol to error check that my second parameter is between 0 and 1023. if not i must print out "R". i have this from a lecturer of which he r...
[6 replies] Last: errno is only used for underflow or overflow, but it should still be c... (by andywestken)
How I can clear a string before of use ?
 
How I can clear a string. For example aux is my string In the first loot I used aux = 1 aux = 1 aux = 1 aux = 1 but if I went printf all aux wa...
[7 replies] Last: If you just set the first char in the string to 0, you also have to re... (by andywestken)
unicode stringstream
 
Hi, I used to do this while I used ASCII characters, but now I need to use UNICODE, and I couldn't find the answer after googling some, and searching the for...
[10 replies] Last: I finally solved it, can't believe how stupid the mistake was... I swa... (by Yours3lf)
August 2011 Pages: 123
  Archived months: [jul2011] [sep2011]

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