Compile and write C++ code on a Netbook? Is it possible to COMPILE and run C++ code on a typical netbook with 160 gig hard drive? ... 11 Dec 2009 20:15
Defining complex data types? I wanted to text the use of complex numbers in C++, so I set up the following (very simple) program: ************************************** #include <iostream> #include <complex.h> using namespace std; int main() { complex z; z = complex(1,2); cout << "z=" ,z,<< endl; return 0; ... 2 Dec 2009 16:39
Define overloaded operators for structures? Is it possible to define overloaded operators for structures? What I want to do is define a structure to represent cartesian points. ie struct Point { double x; double y; }; and then be able to add, substract, and multiply points like they were scalar variables. ie. Point p1 = {1,2); Point ... 15 Dec 2009 21:08
Accelerated C++ Chapter 5 Exercise 1 Greetings all, I got stuck at one point in this exercise. I actually wrote the code for the exercise (for who has the book) but one thing I still wonder... 5-1. Design and implement a program to produce a permuted index. A permuted index is one in which each phrase is indexed by every word in the phrase. I... 30 Nov 2009 03:42
delete operator in class destructor What's wrong with this class code? class Roo { public: Roo(int sz) {ar = new int[sz];} ~Roo() {delete ar;} private: int* ar; }; ... 28 Nov 2009 15:39
Annoncing Gamdel, The Game Description Language Hello all. We want to present you our project Gamdel, a game description language to make games in curses, 2d sdl and 3d opengl in the same executable. Take a look at gamdel.sourceforge.net and give us a comment. Thanks. ... 25 Nov 2009 05:56
K-th min item of an int_array's subrange Have just read on their forum (see below) but it's pretty a complex approach for me ======================================================== to solve this problem, I used Indexed tree recorded sorted sequences. for example) level 0) [1, 2, 3, 4, 5, 6, 7, inf] level 1) [1, 2, 5, 6] [3, 4, 7, in... 23 Nov 2009 21:57
reading a file 1) Guys, i'm trying to read a file with one integer per line, but i got a problem when the last line is empty (linux text files)... it shows the number before the empty line. Any idea? 2) One more thing... when I try to read a line with one character it prints an empty line. Any idea? 1) FILE *in = fopen(argv[1... 22 Nov 2009 03:54
Accelerated C++ Problem setw Hello, I was wondering how to approach the second part of this problem. Part 1 : Write a program to calculate the squares of int values up to 100. The program should write two columns : The first lists the value; the second contains the square of that value. Use setw to manage the output so that the values line ... 18 Nov 2009 17:57
pthread_cond_wait segmentation fault I tried to make a producer of 'items' but my implementation crashes at pthread_cond_wait ... I really tried looking at everything and put print statements throughout my code, but there it just crashes. I did put the wait within a mutex. This code isn't complete, but the relevant parts are in there (I assume). Any ... 12 Nov 2009 17:21 |