UNIX/Linux Programming - March 2009 (Page 2)

memcpy and memcmp Question...
 
if(memcmp(&memblock , DEFAULT_IP.c_str(), defaultIPSize) == 0) { memcpy(&memblock , newIPAddress, strlen(newIPAddress)); int count = 0; while ...
[3 replies] Last: Solved in a completely different way. I wish i just did it instead of ... (by f ben isaac)
by oramiq
segmentation error with pointers
 
the header file: #ifndef B_PLUS_TREE #define B_PLUS_TREE #include <iostream> #include <ostream> #include <stdio.h> #include <stdlib.h> using names...
[14 replies] Last: thank u so much.... the problem is solved :) i conver every address ... (by oramiq)
.h, .cpp and main.cpp files
 
I have a problem with these files. I dont know what im doing wrong. Here is example: //(mod.h) #ifndef MOD_H #define MOD_H na...
[4 replies] Last: Really tnx you guys, everything is working :) (by etrusks)
GNOME GUI
 
Is there a web site out there that teaches the GNOME graphics in C++. Anything will do since I am new to graphics programming in general.
[2 replies] Last: there is a lot of things like design documents, code and example on gn... (by writetonsharma)
Segmentation fault (core dumped) run-time error
 
mystring.cxx file: #include <iostream> #include <cstring> #include <cassert> #include <cctype> #include <stdlib.h> #include "mystring.h" using namespa...
[2 replies] Last: You have a self-assignment problem. s += s; Since this == &adden... (by jsmith)
Set iterator difference
 
Hi all! I'd like to know if C++ STL has a way to count elements in a certain range from a set. I tried using lower_bound/upper_bound, but I couldn't subtract ...
[5 replies] Last: boost::lambda has its own version of bind, but there is also the boost... (by jsmith)
hide terminal
 
Is there a way to hide the terminal window?
[1 reply] : Though I know this topic is somewhat dusty, I could easily ask what te... (by closed account S6k9GNh0)
command line argument
 
I am doing a simple c++ program but I have problem when i want to check the command line argument here is a piece of my code int main(int argc,char * argv )...
[4 replies] Last: now is correct. (by jsmith)
linux filesystem/inode performance
 
I need to store some 100K files, based on user's contact number. Consider the contact number to be 10 digits like (1234567890). On some external event, my proce...
[2 replies] Last: I want to organize the files based on the user's contact number, so th... (by htonivi)
Memory leak detection in linux application
 
Please let me know, how to detect if the application has memory leak in linux platform. Which command/tool and what counters to track, to confidently say that t...
[1 reply] : You might be looking for Valgrind. (by n4nature)
problem with dynamic memory using malloc
 
hi guys actually i was wondering if u could help me out with this code as soon as possible #include<stdio.h> #include<sys/shm.h> #include<stdlib.h> #de...
[5 replies] Last: Ok, simple rule to follow. If you find that the compiler complains ... (by jsmith)
initialization from incompatible pointer type
 
Hello all, I'm facing a problem when compiling a new module to the Linux kernel 2.6 (Ubuntu 8.04), through the command 'make myfile.ko'. I have the following...
[5 replies] Last: you're welcome. i learned something here too. been a while since i... (by jsmith)
strncpy & strlen
 
Hi, i have one program that i develop using windows-ms visual studio 2005. i got no error while using the strncpy and strlen syntax. but when i compile i...
[2 replies] Last: Have youn included string.h? (by kbw)
question about error
 
#include <official_crypto.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv ) { char* B = official_encrypt...
[1 reply] : That is probably not the name of the function...(i.e. offical_encrypt(... (by firedraco)
std::sort for sorting two dimensional array of integers?
 
Hi, I have code, where I need to sort two dimensional array. I know I can use qsort(), but I would like to try std::sort to do this. Is it even possible to sort...
[1 reply] : cmp_int should take const int*, not const void*, and the parameters pa... (by jsmith)
IP Address type?
 
Hi Guys, I am just little bit confused, what I am trying to do is, I am sending a packet across a network through my code, now when I am creating a packet, ...
[7 replies] Last: I am sorry I never replied back with the corrected solution. (by kevinchkin)
What is a good free audio/music player for Linux?
 
Now I no that there are a hand full of media players for linux, but I want one capable of plying music more like Itunes, I want it to have an equalizer and to h...
[5 replies] Last: @ eker676: there is a VLC player available for linux at http://www.vid... (by enduser000)
Odd Structure of "for" Loop! - C/C++?
 
Note: i understand the rest of the code i just do not know exactly how to read the for loop.... void *memmem(const void *p, const void *q, size_t pn, size...
[1 reply] : for(; pn >= qn; p = (const unsigned char *)p + 1, --pn) the ; means... (by Bazzy)
Mail and C++
 
So i have this idea...to make a tool that will connect to my mail account and checs if there is a new mail..If it is...it will pop up a little window in deskto...
[2 replies] Last: you can use Internet Message Access Protocol also. imap has advantage... (by writetonsharma)
Executing a process by filename and forcing PID
 
Hi! I'm writing a program that will basically execute a program, and then kill it later upon the users request. The one problem is that there will be multip...
[2 replies] Last: Fork returns the pid of the new process created. When you execute t... (by writetonsharma)
March 2009 Pages: 123
  Archived months: [feb2009] [apr2009]

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