English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Programming & Design - March 2007

[Selected]: All categories Computers & Internet Programming & Design

#include
#include
#include

typedef struct
{
char *value;
char *suit;
}card;

void fillDeck(card *Deck, char *Value[], char *Suit[])
{
int i;
for(i=0;i<52;i++)
{
Deck[i].value=Value[i%13];
Deck[i].suit=Suit[i/13];
}
}

void shuffle(card *Card)
{
int i, j;
card temp;
for(i=0;i<52;i++)
{
j=rand()%52;
temp=Card[i];
Card[i]=Card[j];
Card[j]=temp;
}
}

void display(card *Card)
{
int i;
for(i=0;i<52;i++)
printf("%s-%s\t", Card[i].value, Card[i].suit);
}

int main()
{
card deck[52];
char *value[]={"A", "2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K"};
char *suit[]={"C", "S", "H", "D"); /*error occurs at this line*/
srand(time(NULL));
fillDeck(deck,value,suit); /*another error occurs at this line*/
shuffle(deck);
display(deck);
}

what's the problem?

2007-03-10 00:33:47 · 3 answers · asked by forgetfulpcspice 3

Im trying to open an ebay store and I dont want it looking like everyone elses. A few people on there have got some really cool designs which they have done themselves... possibly through html, which I know LITTLE about! (not nothing but little)

They have their own backgrounds and pictures and writing styles, colours etc.. and this is their default, so everytime they make a listing it goes into their store with the cool design.

HOW in the world do I accomplsh this... Im a fast learner, one person told me it was too hard... but I know I can do it I just need to know where to go! I know if I had a html page where i entered raw html text I would figure it out no worries but I cant even find that page!

HOW DOES EBAY DO THIS?

Any info would help..thanks

Peace x x x

2007-03-09 23:26:10 · 3 answers · asked by Kira 4

2007-03-09 23:25:17 · 3 answers · asked by asbestosdiagram 1

how can i get free movie divx???can you tell me some site adress..thanks a lots for you help...

2007-03-09 23:10:57 · 2 answers · asked by Maraschio y 1

2007-03-09 23:05:46 · 1 answers · asked by 3nl70b1 1

2007-03-09 22:50:24 · 4 answers · asked by vishwajith s 1

following are the list of program .plz help me write a program.
1.program to add 4 buttons on an applet with caption "one" ,"twom","three","four" using GridLayout ?
2.prog to create an appplet having 3 buttons with captions RED,GREEN & BLUE when a button is clicked the applet background color will change accordingly ?
3.prog to display the contents of a file on screen ?
4.prog to send user name to the server and server will send welcome username to the client ?

2007-03-09 22:37:15 · 2 answers · asked by humtummonkey 3

I am making a 2-player educational quiz. When the user enters in the program, he enters his name, the name of the second player and which subjec they want their questions to be from. Here if they choose SCIENCE they have a collection of 10 questions to answer and points are awarded for the one which writes the good answer!

2007-03-09 22:33:02 · 2 answers · asked by Anonymous

Hi...... If your'e an average sort of computer user, currently studying Window XP's operating system's, and self taught on all major unit's, wiring and component's of a desktop keyboard, monitor, and computer, do you think that would be sufficient knowledge to think about building one, or would that knowledge base be insufficient or inadequate.
Thanx......

2007-03-09 21:30:05 · 2 answers · asked by peanut 5

I have got one question.In Java Programming where we have to use private constructor.Also if there any sample Banking application? just guide me?

2007-03-09 21:11:03 · 2 answers · asked by melksi 1

2007-03-09 20:43:54 · 2 answers · asked by lik_lo 1

X+X^2+X^3........X^n-j

2007-03-09 20:18:04 · 2 answers · asked by sirf _tum 1

i am making a online quiz and it is required that it should end in 1 hour.....if anyone can please the post a code or any help...i will be thankful

2007-03-09 19:38:25 · 3 answers · asked by Anonymous

hello,
thank you for your time to read and helping me first
I have hosting with godaddy linux,
I want to install ffmpeg on my hosting
I don't have ssl or ssh or root access
Is there any way to install it
Please Please Help me out
Thank you for your help

2007-03-09 19:34:38 · 1 answers · asked by Ma_d3si 1

my website which is designed in frontpage is appearing good in internet explorer and not appearing correctly in other browsers what can i do, is there any solution to solve this problem

2007-03-09 19:11:24 · 2 answers · asked by Sujith K 1

i have got the result but need the formulae to tell me how many points to be allocated depending on that result, if you knowwhat i mean!!

2007-03-09 18:56:01 · 7 answers · asked by abcdefg 2

I am writing a program in Java. I need to read a file then store the data in an array. Since I need to declare the size of the array so I need to know how many records are in the file. Is there a quick way to find out the number of records in a file without reading through it? If I know the number of records then I can declare the array then read the file and store the data (meaning to read the file once).

2007-03-09 18:43:18 · 3 answers · asked by Sea_turtle 2

Did I download a virus or is it just me?

2007-03-09 18:17:34 · 2 answers · asked by tinker 1

I am a freshie in java

I have some boubts in this code..
what is the static void f (Letter y)?why is it needed?
what happenes when we call f(x)?
one more question its not there in this code... what is transient in java??

class Letter
{
char c;
}
public class PassObject
{
static void f(Letter y)
{
y.c='z';
}
public static void main(String[]args)
{
Letter x= new Letter();
x.c='a';
System.out.println(+x.c+"to X");
f(x);
System.out.println(x.c+"new X");
}
}

2007-03-09 18:01:59 · 2 answers · asked by Database 2

2007-03-09 18:00:58 · 2 answers · asked by supermegabubble 1

What sort of IS position would be most appealing to you and why ?
(1) working as a member of an IS organization,
(2) being a consultant, or
(3) working for an IS hardware or software vendor?

Or maybe you would have something else in mind?

2007-03-09 17:54:53 · 1 answers · asked by smooches986 4

Hey guys Ive been doing alot of research lately on game programming and i was wondering if I could get some advice from anyone here. My first question is what language should I tackle first? I know that C++ is way off but should I start with C or C# possibly another. The ideal language would be one that I do not have to pay some company money to get their software to use it. ( I know this kinda takes C# out of the running. Does anyone have any advice on where to start or could you recomend any good tutorials or books. Any advice is great.
__________________

2007-03-09 17:52:05 · 6 answers · asked by jazz_guitar_4ever 1

subject is different from body of the text.
how the other party can read it ?? any idea to encode it in one encoding???

2007-03-09 17:35:58 · 2 answers · asked by saad 1 1

2007-03-09 17:34:11 · 1 answers · asked by xinnybuxlrie 5

the code makes text in ur about me section and all the sections u put it in...bold and they are sort of overlapping eachother...

2007-03-09 17:16:19 · 2 answers · asked by Colleenibini 1

I am trying to create a Loop that checks a Textbox and makes sure it is not blank. What I came up with gives an Error that the textbox is empty but when I click OK to exit the MessageBox I can't. It will keep popping up

Here is what I Have:

Do Until txtCost.Text <> ""
If txtCost.Text <> "" Then Exit Do
MsgBox ("Ooops. Please Try Again")
Loop
End If

I'm sure I am missing something. I can't get back to my main form to Re-Enter Text into the Textbox........Please Help this newbie

2007-03-09 16:50:26 · 8 answers · asked by savj14 2

Presently I am working as a web designer. I know Macromedia Flash very well except Action Script. I know basic level Action Scripting. I want to learn advanced Action Scripting. Please somebody tell me from where I can learn complete Action Script 2.0? and how much it will cost for the complete cource?

2007-03-09 16:44:16 · 4 answers · asked by mohy 1

2007-03-09 16:22:19 · 2 answers · asked by krisel h 1

i have this worksheet to do and i get most of the stuff..except one question.

it asks "what's the difference between foo & foo1? how would u call foo1 and foo2 such that they both print 34?"

void foo()
{
int x=34;
cout< }

int foo1()
{
int x=34;
return x;
}

ok so basically. i don't understand the second question of that question at all. the first part..i understand..one is void and one is int. but they both actually PRINT 34. so...i don't get it. i don't really understand "return" i just don't see a difference because they both print 34. one just has return and one is cout.

2007-03-09 16:14:25 · 3 answers · asked by boom56 1

For instance I got a code off of youtube and I copied it to a website called hoverspot and it wont erase.

2007-03-09 16:05:55 · 2 answers · asked by Baby 1

fedest.com, questions and answers