General C++ Programming - November 2010 (Page 12)

Troubles with rand function
 
I'm having a bit of trouble with randomizing numbers for my recreation of the Monty Hall Problem. Here's my code. (Posting all of it, because the problem could ...
[4 replies] Last: Wow... You're completely right. I'm a little out of practice :P Thanks... (by RAWBERRY)
contructor and destructor
 
Hello every body!! please, can you tell me what that code does? it's a linked list thank you very much Node(const Type& inValue, Node* inPrev, Node* i...
[4 replies] Last: thank you very much!! (by fleur1990)
by xephon
A link for learning standard library and STL
 
the following link is so far the best tutorial on standard library and stl i've ever found. it's from microsoft though, so i do not guarantee everything introdu...
[2 replies] Last: Key in "STL tutorial" in Google search and you will get a few hits. Bu... (by sohguanh)
by tomato
how to print ostream&
 
Create a simple class containing an int and overload the operator+ as a member function.Also provide a print() member function that takes an ostream& as an argu...
[2 replies] Last: void Simple::print(ostream& os) { os << this.x << "\n"; } ... (by sohguanh)
Finding lowest/highest values in 2D array
 
Hey guys, any idea as to how to find the lowest value and the highest value in this 2D array? I made the functions to find the lowest and highest, but all im ge...
[11 replies] Last: If you are allowed to use standard C++ algorithm classes, you can amen... (by sohguanh)
Passing equals method to hash table
 
Hi, I am using google hash map. This is the way to pass an equals method from their documentation: struct eqstr { bool operator()(const char* s1, const...
[1 reply] : If sparse_hash_map gives you a constructor that allows you specify a c... (by jsmith)
by p0711
switch statment
 
How can i put 2 choiches in 1 case?? ex: switch(parameter) { case '10-20': cout << "Lucky\n"; break; case '21-30': cout << "Bad Lu...
[2 replies] Last: Thaaaanks aa loooot!!!!!! :):):):) (by p0711)
BMI and BMR calculations, whitespace issue
 
Making a code to take mass in lbs or kr, height in cm of feet and inches (' and " ), age in years and sex(m or f as there is a set number of 5 and -161 res...
[no replies]
... h ... e ... l ... p !
 
I have DevC++ 4.9.9.2 and i see that it doesnt work propertly, can someone give a link from a WORKING MinGW ? And a TUTORIAL on HOW TO INSTALL IT ... please.
[3 replies] Last: DevC++ is no longer supported. Use wxDevCpp if you want a DevCpp based... (by Zaita)
BMP and it's weird upside-down storage
 
I'm making a BMP loader/editor, and I've run into a big dilemma... While I can load the BMP, to change a pixel I have to account for the fact that BMP image dat...
[4 replies] Last: 1) It isn't that complicated, but it is complicated enough that you ma... (by Duthomhas)
arrays issue
 
if i have to input a 2d character array and math and english marks.... CODE FRAGMENT: for(int i=0;i<5;i++) {cin>>a ;/*a is the character array*/ cin>>math...
[1 reply] : You change char a to char a or std::string a ... (by hamsterman)
by taqi
project
 
can any one please give me a simple program which includes array function and graphics
[5 replies] Last: Oh, come on, really? I understand what LittleQuick was trying to do th... (by Albatross)
Cannot find out my mistake
 
hello, i try to make an programm to sort my (a,b,c,d) array descending; this is what i've done so far. please help me. #include<iostream> #include<algorith...
[10 replies] Last: wow that was helpful !! THANKS ! :D (by jumper007)
by toks
socklen_t error
 
Hello, i am trying to execute the code below : /* A simple server using TCP **************************/ #include <stdio.h> #include <sys/ty...
[2 replies] Last: OK, first of all, thanks for the reply CODER777 . finally, the p... (by toks)
recieve folder name
 
Hi. I wrote a program and put it into Windows Context menu but I have a problem. How I can recieve a folder name (Folder path) on which I right-click on? (I ...
[2 replies] Last: when you have windows exploer open and displaying for example a direc... (by guestgulkan)
Read multiple files(.txt) from a folder
 
Hello guys, I have a code that read txt file. But now I Need a code For reading multiple files(.txt) from a folder and save each one in separate array. ...
[10 replies] Last: All right....The code works well now with eclipse environment but it i... (by abotaha)
Functors
 
Hello, I would like to use a functor which is also calling an other functor. I am not sure if I am using the right terminology. I manage to use only one functo...
[5 replies] Last: My code can also be written by using global functions instead of stati... (by sergioroa)
Linked Lists
 
I just implemented a linked list of lists. My program runs correctly if I remove all the destructors. However, I get weird behaviour if I add destructors to cor...
[3 replies] Last: When I call delete from within this deleteNode function, does it call... (by Disch)
by qjwzyy
strange error
 
struct net{ char PIPIN ; char POPIN ; }n ; //change PIPIN and POPIN value here. cout<<n .PIPIN<<", "<<sizeof(n .PIPIN); // The result is: 2424,2 //...
[1 reply] : crosspost http://cplusplus.com/forum/beginner/31513/ (by Disch)
by Wander
While Loop is Crashing Program
 
I am making a program to generate random dungeons. So far I have it where the program can fill the map with solid earth and then carve out a room at a random po...
[9 replies] Last: OH MY GOD YES!! I FIXED IT!! Thank you for asking about the dimensions... (by Wander)
November 2010 Pages: 1... 1011121314... 21
  Archived months: [oct2010] [dec2010]

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