ok then so how would i make it cout the count and then keep giong until all six numbers match?
Type: Posts; User: got1sleeve
ok then so how would i make it cout the count and then keep giong until all six numbers match?
I'm creating a lottery game that solicits 6 numbers from the user between 1-59 and then generates 6 numbers until they all match. When I compile and run my code it takes the user input fine. However...
well I struggle with c++ let alone know anything about c haha i stick to this forum....but any suggestions as to why the code doesn't output anything?
My teacher must have confused me then. I originally had the & in there and he said strings are pass by reference so i didn't need them in there and thats why they were causing the link error. I...
I was told that passing strings pass by reference and not value.
and if i change the header to
void poker (string &card1, string &card2, string &card3, string &card4, string &card5)
I...
Ok fixed everything...code compiles and builds. Only problem is it does not display the cards. It just asks user to press D to deal and then says thanks for playing.
#include "stdafx.h"...
Ok so i made some major modifciations here IMO. I changed it from void to int. As well as I have to use strings to display the card. Also i came up with the process to prevent drawing another...
i thought you set it to void though BECAUSE it doesn't return a value?
Hello again everyone I'm designing a code now that just deals a five card poker hand when the user presses D. I have to use pass by reference for this which I have pretty much no understanding of....
How would you write a program to pick a math problem at random? i.e. add,divide,subtract,multiply? I guess using either subroutines or not but it would most likely be in a switch statment where the...
I'm kind of teaching myself and learning from you all but i see what you're saying about the error that makes sense once its explained haha but to a noob just reading that it looks like swahili
If i removed the void from inside main I get a compile error:
Lab 3.obj : error LNK2001: unresolved external symbol "void __cdecl get_menu(void)" (?get_menu@@YAXXZ)...
So here's what I tried...which is basically what you both had said:
void get_menu();
int main()
{
void get_menu();
Thanks for the help guys....I apologize for the incorrect terminology...i'm still learning the language as you can see.
I am now learning to create functions. I have read the tutorial on this site and several others. I have not been able to find any guidance though as to how to creat a function that returns a menu....
ok so i took the advice your advice and 1) changed the num gen and 2) went with the multiplication idea...no problems really except for the fact that I added a portion that tells you what the...
thats just how he recommended writing it and said he preferred it that way
It HAS been pointed out to me before but as I wrote in the reply that is how my professor wants it coded. Its not my option but thank you for pointing that out again.
i apprecieate the quick response but i'm looking for some understanding of the language not just a quick answer but thank you agian for the help
How can you force the a program to only pick numbers that are divisible to an integer?
for (pro = 0; pro < numpro; pro++) //keeps a count until number of problems desired is reached
{...
Originally I wasn't using that buy monday my professor said he reccomends writing it out that way because the first one assigns a rand value to num1 and then the second line keeps it below 100.
I...
I have a text book for school but it describes things very briefly and gives one to two examples of things. Not to mention a professor who is head of the computer engineering department and has never...
[QUOTE]
I put on the Hat of Guessing and say that you're talking about the line with the if statement? The conditional check inside the if must be enclosed within parentheses:
if (whatever ==...
I appreciate the help...i was hoping someone could explain things a bit to me though as well sorry if i was vague about that.
Why does
case a:
case A:
work but
case a,A:
doesn't?
Hey everyone. So i'm relatively new to all of this and have no experience. If it matters i'm using visual studio 2005.
I'm having trouble getting my switch statments to be recognized. Also I'm...