Beginners - October 2012 (Page 8)

thread wrapper class
 
Hi all, I'm writing a wrapper thread class. Because Posix "pthread_create" needs a static function, the concrete classes that going to use the "start" methods ...
[3 replies] Last: I'm writing a wrapper thread class. Yay! Because Posix "pthread_cre... (by kbw)
by G3PO
Calculating Area Under Curve (1,2)
 
So I'm supposed to create a program that calculates the area under the curve for f(x) = x^4+3 using rectangles and/or trapezoids. I have no clue how to do this ...
[25 replies] Last: I don't know how important it is to perform this efficiently (probabl... (by kbw)
by RoMo
functions with password creating code
 
I'm finding it really hard to understand how functions and bool types are implemented.. #include <iostream> #include <string> using namespace std; int ma...
[2 replies] Last: Thank you very very much (by RoMo)
Error in code--need help fixing
 
I'm doing a part to a project where I'm making a weapon class and a test program. The weapon class has to have three private data members: two integers (hit_cha...
[4 replies] Last: What error do you get? When you post code it's better if you don't i... (by Peter87)
Square Display
 
A practice question from the C++ textbook. Write a program that asks for a positive integer no greater than 15. The program should then display a square on ...
[4 replies] Last: @abeginner23235616 Close, but not exactly right. (a) if the user inpu... (by Chervil)
Qustion about set function!!
 
Hi I have a question about set function!! I got an assignment for my programming class that is to make Finite State machine!! Professor provided the header fi...
[2 replies] Last: Thank you very much!! (by munjo5746)
help me solve it
 
#include <iostream> using namespace std; bool check (int z ,int y,bool exist=false) { int x=0; while (x<6) { if ( z ==y ) { exist=true;} else { x++;}...
[4 replies] Last: On line 7: sizeof (z) is the size of the pointer to that array, it d... (by coder777)
calculater for a grade
 
I can't seem to get the formula right in the loop to add together all of the points total and points possible, and get a grade from them. Here is the question. ...
[3 replies] Last: First, you need to edit your post so it uses code tags - the <> butt... (by TheIdeasMan)
Double Linked Lists
 
Anyone have any advice on how to obtain data from a .txt file, determine if it is even/odd and then store it into 1 of 2 linked lists depending on whether it is...
[9 replies] Last: Define "LinkedListNode" once, and then declare two objects: struct L... (by BlackSheep)
C++ Video: Understanding rvalue and lvalue
 
http://www.youtube.com/watch?v=UTUdhjzws5g&list=PLE28375D4AC946CC3&index=18&feature=plpp_video The video explains in detail what rvalues and lvalues are. Rv...
[no replies]
want to find pi... almost there
 
What needs changed? It doesn't approximate pi accurately. #include <iostream> #include <iomanip> using namespace std; int main() { double pi = 1;...
[5 replies] Last: Leibniz's formula converges slowly. Calculating π to 10 correct deci... (by tntxtnt)
by hjone
How to keep Guesser object in scope
 
I need to make a new Guesser object in Game, but I don't know where to put it so that all of the Game functions can see it. GAME.CPP #include "guesser.h" #inc...
[5 replies] Last: Checked your code. There seems to be a few output errors. I've tried f... (by spixz)
Debug Assertion Failed … _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
 
Debug Assertion Failed … _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) May I know why im getting this error in google, they said it something problem about dyn...
[5 replies] Last: Got it! In my function declaration, void specific_month(const int le... (by vichu8888)
Don't understand the assignment.. can somebody clarify?
 
Write a function bool equals(int a , int a_size, int b , int b_size) that checks whether two arrays have the same elements in the same order. I'm not unde...
[4 replies] Last: also, realize there are four arguments in your function. you need to m... (by Aerion4)
problem returning arrays from function to send to a function
 
# include <iostream> # include <iomanip> # include <Windows.h> # include <string> # include <cstdlib> # include <sstream> using namespace std; //Fu...
[1 reply] : you've got a lot going on here. For starters, look at the list of poin... (by Aerion4)
std::set - How do i alter element in list?
 
How do i alter an element in the set for example how do i edit the 'm_a' member variable of a element in my set? class CPerson { public: int m_a; ...
[2 replies] Last: A set element once inserted cannot be changed. You can erase it and in... (by tntxtnt)
by hjone
error:no matching call to function Guesser::Guesser()
 
I was given the files hangman.cpp, guesser.cpp, guesser.h, provider.cpp, provider.h, game.cpp, and game.h. I have to change the game files (originally not in cl...
[5 replies] Last: Why would guesser and provider be pointers in the game.h file? (by spixz)
logging statements
 
What are these and how are they made? Can you provide some examples?
[3 replies] Last: There's also clog. (by Gulshan Singh)
by khal
Grouping Words
 
I was wondering is there an efficient algorithm to group similar words that are only one character off? Like "rat" and "cat"
[2 replies] Last: Look at Levenshtein distance (also known as edit distance) and suffix ... (by Gulshan Singh)
Printing a char array
 
Hi, Can someone tell me why I can print a char only if it is initialized in the var declaration. I other words if I do this it works. char name = "Je...
[5 replies] Last: Thank you all very much for the good advice, it now makes more sense. (by fstigre)
October 2012 Pages: 1... 678910... 84
  Archived months: [sep2012] [nov2012]

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