General C++ Programming - April 2008 (Page 4)

Random Number Generation with Blitz
 
Dear all, I am running blitz 0.9 and g++ (GCC) 3.3.3 (SuSE Linux). I wrote a test program 'bet...
[1 reply] : Try to replace: Beta<double> betaGen; betaGen.setPara... (by ropez)
Decimal Value of the Ratios of Consecutive Fibonacci Numbers
 
Hi, I was hoping someone could shed some light on this for me. I am stuck on an assignment. I hav...
[1 reply] : Give some thought to what the word "ratio" means, and look at the firs... (by JivanAmara)
string
 
case1:char* a="cplus"; cout<<*a; //outputs c cout<<a ; // outputs c case2:char e ="cplus"; cout<...
[2 replies] Last: Google "Thinking in C++" and download the PDF. (by medievalelks)
by naja
is it possible to reduce redundant code like this?
 
hi, Im writing a hash calculator. This means that a lot of stuff in my code exists for each algo...
[1 reply] : Use polymorphism: class Calculator { virtual void onBoxStat... (by medievalelks)
by mb108
Iterator question -- templates
 
I know I'm missing something, and I'm hoping somebody can explain to me why this generates compiler ...
[5 replies] Last: I tried it and it worked, but my testing was sloppy. Here's what work... (by mb108)
Manipulating 2d arrays need help
 
I have a project for my c++ class, and in that project I have to read in from a file a number indica...
[1 reply] : This looks pretty good so far, except that your declaration of A limit... (by jsmith)
strcmp problems... pointer 2 private pointer
 
LOTS of source to look at here, basically it does everything I want it to but properly compare the v...
[1 reply] : I think your problem is in this section of code in addWord: if( ... (by jsmith)
by sparky
cin.getline() not working
 
Hello, Why does my cin.getline(); not work sometimes? In these circumstances, I am forced to add ...
[8 replies] Last: rpgfan3233, you know, I reread your post several times and it has n... (by sparky)
Memory Release Problem
 
I have a problem with releasing memory. I have made a test program that demonstrates the problem ...
[2 replies] Last: Note that I said in the description that 10000000 probably wouldn't wo... (by chronicle)
cannot convert parameter 1 from 'std::string [12]' to 'double []'
 
ive been getting this error(error C2664: 'getRainfall' : cannot convert parameter 1 from 'std::strin...
[2 replies] Last: well the thing is i have an assignment and, the array must be double t... (by lothrodel)
Introduce OFDMA into ns-2
 
Hello, I'm considering to introduce OFDMA in ns-2. In ns-2, a network simulator, it develop appli...
[no replies]
by sparky
char[] comparison
 
Hello, How do I compare the values stored in char arrays? Any assistance will be appreciated. Tha...
[2 replies] Last: rpgfan3233, It worked!Thank you very much for your help. (by sparky)
Trimming a string
 
I have to write a function for my program on trimming a string. This is what I have to work with. ...
[1 reply] : Setting aside the fact that there are a zillion easier ways to do it..... (by jsmith)
class(scope)
 
class a{public: void sat(){x=6;y=5;} int x; private:int y;}; DOUBT: in above class in member fu...
[1 reply] : The C++ compiler is a multi-pass compiler. On the first pass, the com... (by jsmith)
function inside
 
#include<iostream> using namespace std; void f1(){ cout<<"entered into f1"; void f2(){...
[1 reply] : Neither C nor C++ allow you to define functions within other functions... (by jsmith)
INDIRECTLY
 
I HAVE READ THAT MEMBER FUNCTIONS OF A CLASS CAN ACCESS THE MEMBER DATA BUT INDIRECTLY. WHAT DOES...
[1 reply] : This means: "Do NOT shout!" (by Repentinus)
by sparky
Structs with a Class
 
Hello, I keep getting the following error when trying to use structs within a class (see code bel...
[3 replies] Last: If you're using it as newNode->person->FNAME, it would be declared ins... (by rpgfan3233)
Need Help with Winsock downloading (small errors)
 
I have this code here and it keeps getting small errors in what it downloads, which end up corruptin...
[no replies]
by lank23
help with find and replace
 
Hello; I wrote this program read a text file and find "0,to 9," and replace them with "0 to 9 " ...
[no replies]
April 2008 Pages: 123456... 11
  Archived months: [mar2008] [may2008]

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