UNIX/Linux Programming - February 2012

by fafner
relative path
 
In my code I have a line similar to this: fopen("../textures/test.bmp") This works if I run the program from its own directory, however it doesnt find t...
[2 replies] Last: Easy as that huh? :p I thought I was doing something wrong. Thanks! :) (by fafner)
I loose some precision when converting string to float.
 
Hello, When I convert a string to float I get a value that is a little smaller. e.g. as in the code below I expect price to be 1.3467800 (which std::cout ou...
[2 replies] Last: Further to kbw's link, this is helpful: http://floating-point-gui.de/ ... (by Moschops)
HEADER FILES
 
i created a header file for class, it contains add() function save it as a abc.h.i created abc.cpp file which contains a defination of add function.if i include...
[1 reply] : The function is compiled and exists in the first program/library. Whe... (by kbw)
by lirchi
Managing Processes
 
Hi, I have one process to create 10 sub-processes and they all share a memory segment. the 10 sub-processes can run concurrently, but the father has to sleep...
[1 reply] : memcpy(kidsParams , exec_line.c_str(), exec_line.size()); What's wro... (by kbw)
by san81
running scheduled tasks
 
Hi All, We have a task, where user configures some schedules in frontend and based upon those schedules we have to run few tasks. From frontend , we are c...
[1 reply] : You could write an app the extract time and other details from the DB ... (by kbw)
by fafner
class members in static function
 
This might have been discussed to death before, but I haven't been able to find a good solution yet. I'm trying to create a small library which works on top ...
[8 replies] Last: Yeah, now that I think about it, it makes sense to have a global "defa... (by fafner)
I need some input with mutex and condition variable.
 
I do not think my code is doing what I want it to do. I want receive() thread to work in real time as fast as possible and not to wait for process() thread. ...
[15 replies] Last: Hi Cubbi, I think I'll just go with the list for now. I do not want to... (by vincegata)
Strange error while linking of static OpenSsl libraries
 
Hi Everyone! I have been working on this task since time of my last post. Has been resolved a lot of problems. But when i was linking final executable file...
[5 replies] Last: I have found the solution, we have to use the same preprocessor defini... (by Avega768)
by teesha
Pthreads Programming
 
Please help me out..if i will not answer this question in 2 days here is the question
[4 replies] Last: Haven't you learned anything at all? Can't you start it at all? Do y... (by kbw)
Loading sound files into memory for BASS library..
 
Im using BASS audio library (http://www.un4seen.com/) which allows me to play audio from files and also from memory. I have managed to play audio from a file, b...
[1 reply] : Ok i was right, i really needed to read furthur, missing the size para... (by javajames)
Segmentation Fault in Stack
 
Hi, For some reason I can't seem to understand why the while loop at line 45 is causing an out of bounds error? #include<iostream> #include<cstring> #i...
[4 replies] Last: I just took at look at yours we had the exact same thing except I had ... (by MrScratch)
Extending and Embedding Python with Boost
 
Hi everyone, I have successfully extended and embedded python in C++ using the boost libraries. However, it isn't doing what I want. I need python to be able...
[no replies]
Help with problem with overloading ostream operator for matrix class
 
Here is my matrix.h file #pragma once #include <iostream> using namespace std; #ifndef MATRIX #define MATRIX typedef double ElementType; class Matri...
[4 replies] Last: I missed the constant, everything works now thanks (by ashleyd)
Inherited classes with a deque
 
So I'm writing a program for my data structures class. The program description can be found here: http://mathcs.holycross.edu/~csci132/assignments/homework3.htm...
[no replies]
by TOBS
compare argv with char[ ] problem
 
Hi guys, could you please help me with this code: I need to compare argv with char text , if argv (for example: if I set ./program a via command line) i nee...
[3 replies] Last: As you've written, this finds 'a' char *pos = strchr(text, 'a'); p... (by kbw)
execute program in a new terminal
 
Hello, so I need to code a line in C++ which opens a compiled program in a new terminal.. this : execv ("gnome-terminal -e" , (char* const*) "./myprogram" ); ...
[2 replies] Last: You shouldn't cast away error messages. RTFM to know what the argument... (by ne555)
Data input from file at command line
 
Hi all! I have a code that asks the user to input some parameters from a command line using operator in a form cin >> param; Sometimes I pass these par...
[9 replies] Last: This worked like magic. A simple piece of code int a; if(isatty(STDIN... (by majinsaha)
unique words using the set function
 
hi, part of my assignment needs me to count the unique words from a user input. This is the code I have: #include <string> #include <iterator> #includ...
[8 replies] Last: +1 @moorecm I think I slightly misread the assignment. (by Galik)
static library and link errors
 
Hi Guys I was doing the porting of my C++ app to linux, when the next error happened. I'm using the Code::Blocks IDE for manage my project. For ex: I have ...
[7 replies] Last: Hi Guys I have found the cause of the problem!!! When we link library... (by Avega768)
beginning parallel programming
 
hello i would like to start dealing with parallel programming but i dont know where to start which libraries should i use or some good tutorials.Im still learn...
[6 replies] Last: hello again i checked openMp ,zthreads and pthreads from linux. openMp... (by giannhssdra)
February 2012 Pages: 123
  Archived months: [jan2012] [mar2012]

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