UNIX/Linux Programming - April 2011

why the text file size is one more than the character count
 
Hi all: i have a file which contains 332 characters determined by using the document statistics feature of gedit, but actually its file size on disk is 333 byt...
[4 replies] Last: yes,now i get the point . thanks a lot ! (by sysabod)
stdio.h syntax related error?
 
When including stdio.h and building my program, I receive the following error: /usr/include/stdio.h|30|error: expected identifier or ‘(’ before string con...
[8 replies] Last: Instead I took out the include (Minini) which caused this error in Win... (by Krisando)
Socketing
 
Greetings, I was wondering if anyone had some good links for Linux socketing or some good examples of windows / Linux socketing. I am looking for C++ exampl...
[4 replies] Last: See some good links: http://www.kgsepg.com/project-id/12881-tcp-ip-so... (by techie07)
by banu
Unix system crashing - Need help to identify the issue
 
Hi, We are accessing our remote webserver using libcurl.We are using GET method to post the request.The request is a simplified URL.We will receive XML Respons...
[4 replies] Last: I'd guess that you have a memory bounds error that's corrupted the sta... (by kbw)
C++ recursive string subset? NEED HELP
 
hi. /*Write a recursive function that returns a vector of strings containing all subsets of a string value passed in (the passed string represents a set of c...
[3 replies] Last: Have you tried doing with pen/paper first? If not, give it a go with ... (by kbw)
by ivanBG
Runing Allegro binary on different pc.
 
Hi, I have written a snake game using allegro. So I want to share it with my friends, but the binary file won't execute, even after installing allegro. They hav...
[3 replies] Last: Solved it, it's very easy actually. Here is how: g++ game.cpp -o game... (by ivanBG)
by karlo
g++ doesn't find default libraries
 
I have the problem that g++ doesn't find anymore default libraris of STL etc. For example if i want to complile: #include <iostream> int main() { return 0...
[no replies]
String comparisons. a program to compare words of two files and return them
 
// I'm having this problem with HandleQueries function. Everything else in the // in the program is completely right. Please do provide any refernces if you g...
[3 replies] Last: THe problem Statement - TASK: Write a C++ program to read a collection... (by anuragbs)
Error; "conflict type for ..."
 
#include<stdio.h> #include<pthread.h> #include<unistd.h> #include<stdlib.h> #include<string.h> int in=0; int out=0; int shared_counter=0; char* buffer ; pthr...
[3 replies] Last: Do you know about function prototypes? I suggest you declare the StrR... (by anonymous23323124)
by tap3ah
APUE book Exercise 3.2 (no solution)
 
Write your own dup2 function that performs the same service as the dup2 function described in Section 3.12, without calling the fcntl function. Be sure t...
[2 replies] Last: http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html (by tap3ah)
by rw123
compile error
 
Hi. Am new to c++ and need expert help in resolving error mentioned below. The code below compiles fine on older Sun versions (CC 5.3 and 5.8). Thanks so mu...
[1 reply] : DBSql Database::Table( const char* tableName ) { return Table... (by diedrexler)
Help: Pass an Input to a Program for test
 
Hey guys I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and ...
[7 replies] Last: Basically, show what is inside the cat file, which is about "control c... (by Garfed)
memory usage problem.
 
Hi All, I am working on optimizing the memory usage of my codes and I found a problem that I do not understand. Please let me know what you think. Code: ...
[2 replies] Last: It's more likely that the pages are not being released back to the OS ... (by Athar)
Outputting Arabic characters
 
Hello, I recently switched over to Ubuntu because of its support for unicode. I am trying to create a program that will handle Arabic characters the same way ...
[2 replies] Last: Agreed. Outputting them to the console might be tricky. I'm not sure... (by moorecm)
Trouble reading from a file
 
Ok, I'm trying to iterate through all files in a directory to be used as arguments for another program. Trouble is, I am only getting the first letter of all t...
[4 replies] Last: Thanks Athar, I appreciate the help. I'm new to C++, as you can tell.... (by lostincode)
SIGCHLD and watpid()
 
I am launching a number of processes using fork(), of which only a particular process i need to catch in parent process, others would be caught in signal handle...
[1 reply] : Check errno after wait() to see why you got -1. (by kooth)
by crinus
Emulator of PowerPC
 
Whether there is ready sources?
[1 reply] : This is a classic case for Google search. Recently active open source ... (by Zeillinger)
by ivanBG
Allegro problem
 
Hi, I'm using the allegro library under Ubuntu 10.10, when I compile something on my desktop it works, but if I compile or copy the compiled file to another dir...
[2 replies] Last: Thanks, at first I told that the files will be stored in the executabl... (by ivanBG)
Program compiles and runs in Netbeans but not at terminal
 
I've got a simple program (at one point an empty program to test) that will run and compile fine in Netbeans, but at the terminal I get the error: ./main.0: 1:...
[7 replies] Last: Yes, that is correct. I'm guessing I'm not finding the executable cre... (by lostincode)
g++ header searching path
 
How can I add a folder and ALL ITS SUBFOLDERS to the "include searching path"? Then if myheader.h is in one of these folders, I can use "include <myheader.h>" i...
[3 replies] Last: Do it one time inside a Makefile so you don't need to repeat typing th... (by sohguanh)
April 2011 Pages: 123
  Archived months: [mar2011] [may2011]

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