Beginners - September 2015 (Page 23)

algorithm to check for pair in 5-card poker hand ?
 
Hi, what is the correct algorithm to check for a pair in a 5 card poker hand? Here is what i got: if (cardValue == cardValue || cardValue == cardValue ||...
[2 replies] Last: To find out if it is correct test it!! Probably I would simply count ... (by CodeWriter)
new to a job
 
I am in a new T.A.(Teacher Assistant) position. My boss asked me to remake an excel file from the state, I did as I was told; but ran into a problem. When Typed...
[no replies]
Brand new to here, asking for help/advice
 
So as the title says, I am new so hello to all. I am in a programming class and would like some help. I am having to do a project about using functions, but I a...
[6 replies] Last: Okay, so thank you to all. I'm sorry if it wasn't maybe worded the bes... (by pheliont)
Perfect squares which are the sum
 
Write your question here.
[1 reply] : "Question" (by YFGHNG)
help with code snippets
 
I see posts with snippets of code inserted into the post. How do I do that so I can give examples of what I'm talking about? tex
[3 replies] Last: See this article for information on how to use code tags. http://www.... (by AbstractionAnon)
Question for this loop (erasing elements)
 
I'm trying to take off what the user wants to take off from a sample text. ie. Sample Text: Winning Something!!!!111!!! If the user asks to take out the nu...
[1 reply] : Well I should have payed attention to while loops more.... Solved (cha... (by nategherkin)
_block_type_is_valid(phead- nblockuse) line 52
 
This is my code. Apparently the error is line 52 and i have no idea how to solve it :( I read a bunch of posts that's it's due to deleting a pointer twice or so...
[2 replies] Last: I figured what happened and i guess ListA is being deleted by the dest... (by Lesterberne)
Help me out with this program!!
 
#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<stdlib.h> class STUDENT { char name ; char grade; int roll; public: ...
[5 replies] Last: Thanks #MikeyBoy I got it now!! (by Arya Giri)
Writing an intersection algorithm using linked list recursively?
 
Below is a function that prints out the intersection of two sets. I'd like to rewrite it using linked lists and recursively, but I just don't know where to star...
[1 reply] : //intersection with an empty list gives you an empty list. intersecti... (by ne555)
by seanuu
HELLLLP T.T
 
How to do this T.T Help me guys ASAP ____* __*** ***** __*** ____* Half diamond? only this. * *** ***** *** * #include<iostream> usi...
[5 replies] Last: Don't double post. We don't do homework. (by closed account 48T7M4Gy)
ambiguous behaviour of a class template with specialised function
 
I have got the following code in my header file: template <class TType> class CTestTmpl { public: CTestTmpl() {}; ~CTestTmpl() {};...
[1 reply] : Some people on an other forum just gave me the solution. When addin... (by machiel)
by yume9
How to create an object only in some specific case ?
 
I'm programming a main funcion that solves a mechanical problem using several other functions. Depending on the kind of mechanical problem considered (defined b...
[5 replies] Last: Well it's already how my code is made but it can certainly be improved... (by yume9)
Help! Operator Variable in an IF Statement!
 
Hi. I'm making a basic maths quiz in which a random operator is chosen along with two random integers. The random operator is chosen by an if statement. A rando...
[5 replies] Last: Is it possible to store operators ... Yes. "Function objects" is the... (by keskiverto)
The program just let's out all my cout commands
 
how do i fix this? #include <iostream> #include <string> using namespace std; int main() { double restaurant, date, bill, tax_rate, tip, num_ppl, total_forpp...
[6 replies] Last: ah i see. Fixed it! thanks so much for that. i was going crazy trying... (by jeffg64)
Reset an array after sorted
 
so my teacher ask us to sort an array in 3 different ways and reset it back to the original. I have everything figure out but the reverse function. Help me ple...
[1 reply] : In order to reset the array you need to make a copy of the original ar... (by coder777)
First letter cut off from string - Wierd
 
There seems to be a wierd quirk in my code which causes the first letter of the string to be cut off in the output. The code is simple, it asks for the number ...
[9 replies] Last: 'Bad' is probably a bit discouraging but the point is by doing it the ... (by closed account 48T7M4Gy)
Rock/Paper/Scissor game for C++ help!
 
The rules are that: Scissors > Paper Paper > Rock Rock > Lizard Lizard > Spock Spock > Scissors Scissors > Lizard Lizard > Paper Paper > Spock Spo...
[4 replies] Last: HAHA I just yesterday saw this episode of The Big Bang Theory .. Thats... (by Swapnil2000)
Series
 
Hello, I'm beginner in C++ language and I tried to make a program that gives to me an value of a series formula. Later I will introduce long types, but for a fi...
[4 replies] Last: Hi, I strongly suggest you use the double type rather than an int ... (by TheIdeasMan)
Aligning columns. Yes, that problem.
 
Hello, I've got two projects on the go (and a possible third this weekend). I posted my first project (to do with primes) a few days ago, and was overwhelme...
[4 replies] Last: You might also consider converting what you want to format into a stri... (by cire)
Feel like im close, for loop is not displaying data
 
Hello -- I'm trying to output a conversion of liters to gallons, incremented by a variable which is determined based on the difference between two numbers (lowe...
[6 replies] Last: That could have been done with a for loop, but for tonight I'm off. Gl... (by MannedTooth)
September 2015 Pages: 1... 2122232425... 42
  Archived months: [aug2015] [oct2015]

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