Click here to Skip to main content
15,896,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFCB and BIOS file operations Pin
Jayapal Chandran12-Jul-10 0:28
Jayapal Chandran12-Jul-10 0:28 
AnswerRe: FCB and BIOS file operations Pin
Code-o-mat12-Jul-10 0:49
Code-o-mat12-Jul-10 0:49 
AnswerRe: FCB and BIOS file operations Pin
Aescleal12-Jul-10 1:09
Aescleal12-Jul-10 1:09 
GeneralRe: FCB and BIOS file operations Pin
Jayapal Chandran12-Jul-10 1:40
Jayapal Chandran12-Jul-10 1:40 
QuestionHow to solve this error information: "_WIN32_WINNT settings conflicts with _WIN32_IE setting" ?? Pin
wangningyu11-Jul-10 23:35
wangningyu11-Jul-10 23:35 
AnswerRe: How to solve this error information: "_WIN32_WINNT settings conflicts with _WIN32_IE setting" ?? Pin
Emilio Garavaglia12-Jul-10 0:02
Emilio Garavaglia12-Jul-10 0:02 
GeneralYes ,you're right ! Pin
wangningyu12-Jul-10 0:14
wangningyu12-Jul-10 0:14 
AnswerRe: How to solve this error information: "_WIN32_WINNT settings conflicts with _WIN32_IE setting" ?? Pin
asokan12327-Jun-11 18:34
asokan12327-Jun-11 18:34 
QuestionHow to find difference between two dates Pin
raju_shiva11-Jul-10 23:24
raju_shiva11-Jul-10 23:24 
AnswerRe: How to find difference between two dates Pin
Cedric Moonen11-Jul-10 23:31
Cedric Moonen11-Jul-10 23:31 
GeneralRe: How to find difference between two dates Pin
raju_shiva11-Jul-10 23:46
raju_shiva11-Jul-10 23:46 
GeneralRe: How to find difference between two dates Pin
Cedric Moonen11-Jul-10 23:49
Cedric Moonen11-Jul-10 23:49 
AnswerRe: How to find difference between two dates Pin
Niklas L11-Jul-10 23:31
Niklas L11-Jul-10 23:31 
AnswerRe: How to find difference between two dates Pin
Aescleal11-Jul-10 23:48
Aescleal11-Jul-10 23:48 
GeneralRe: How to find difference between two dates Pin
Le@rner12-Jul-10 2:25
Le@rner12-Jul-10 2:25 
GeneralRe: How to find difference between two dates Pin
raju_shiva12-Jul-10 19:01
raju_shiva12-Jul-10 19:01 
GeneralRe: How to find difference between two dates Pin
Le@rner12-Jul-10 19:44
Le@rner12-Jul-10 19:44 
Questionadd the specified number of days to current date Pin
zon_cpp11-Jul-10 22:34
zon_cpp11-Jul-10 22:34 
QuestionRe: add the specified number of days to current date PinPopular
CPallini11-Jul-10 22:55
mveCPallini11-Jul-10 22:55 
AnswerRe: add the specified number of days to current date Pin
zon_cpp11-Jul-10 23:34
zon_cpp11-Jul-10 23:34 
AnswerRe: add the specified number of days to current date Pin
rahul.kulshreshtha22-Jul-11 19:17
rahul.kulshreshtha22-Jul-11 19:17 
Questioni am makeing bacarrat in c language.... it's really hard could anyone plz help? Pin
kcta559711-Jul-10 18:28
kcta559711-Jul-10 18:28 
AnswerRe: i am makeing bacarrat in c language.... it's really hard could anyone plz help? Pin
Iain Clarke, Warrior Programmer11-Jul-10 22:53
Iain Clarke, Warrior Programmer11-Jul-10 22:53 
kcta5597 wrote:
but c is hard...


That's why you're taking a class, to learn more about it and make it easy!

I won't help directly (otherwise, how do you learn), but I will give a few tips:

1/Read the "how to ask a question" post at the top of this forum. It's there for YOUR own safety and convenience. Annoying people with badly formatted questions lowers your chances of being helped.

2/ Break your problem into manageable bits.

3/ Break your problem into manageable bits.

I know I said it twice, but it's the most important programming lesson you will ever learn.

The first bit of your assignment is to print a question. Look over your previous classwork and find out how to do that.
Next, get the answer from the user.
Then, validate the answer.
If the user puts in silly answers, tell them they're an idiot and loop back.
int nPlayingAs = 0;
...
while (nPlayingAs != PLAYER && nPlayingAs != BANKER)
{
   // ask the question
   ...
   // Get the answer into nPlayingAs
   ...
}


Notice I write PLAYER, not 1. Get in practise for later. It's over the top for this assignment, but your future self will thank you later.

Do the same with the bet number...

How you draw the cards is up to you.
You could have a random number from 0-51. Or, two random numbers: 0-3, and 0-12. This was you can say "4 of hearts", not just "4".

Make sure to keep track of cards you've already drawn. You don't want the user to think you're pulling the same card again, do you?

I wish you luck with your assignment,

Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!

GeneralRe: i am makeing bacarrat in c language.... it's really hard could anyone plz help? Pin
Niklas L11-Jul-10 23:03
Niklas L11-Jul-10 23:03 
GeneralRe: i am makeing bacarrat in c language.... it's really hard could anyone plz help? Pin
CPallini11-Jul-10 23:06
mveCPallini11-Jul-10 23:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.