Vintage Mustang Forums banner

1 - 10 of 10 Posts

·
Registered
Joined
·
1,258 Posts
Discussion Starter #1
I have to write a program for a trivia game, nothin complicated but I need a few ideas for Catergoy type questions
 

·
Registered
Joined
·
1,258 Posts
Discussion Starter #2
And dont worry! I have Mustang's as a category!
 

·
Registered
Joined
·
437 Posts
#define CATEGORY_TYPE_65_66_MUSTANGS 0
#define CATEGORY_TYPE_67_68_MUSTANGS 1
#define CATEGORY_TYPE_69_70_MUSTANGS 2
#define CATEGORY_TYPE_71_73_MUSTANGS 3
#define NUM_CATEGORIES 4

for (int nCat=0;nCat<NUM_CATEGORIES;nCat++)
{
switch (nCat)
{
case(CATEGORY_TYPE_65_66_MUSTANGS)
// Questions
break;
case(CATEGORY_TYPE_67_68_MUSTANGS)
// Questions
break;
case(CATEGORY_TYPE_69_70_MUSTANGS)
// Questions
break;
case(CATEGORY_TYPE_71_73_MUSTANGS)
// Questions
break;
}
}


/forums/images/icons/wink.gif
 

·
Registered
Joined
·
1,098 Posts
Heh, thats a little more like C than C++, for C++ you'd want to use a virtual method and dynmically resolve the category <G> ... its been a while, I'm all Java these days.
 

·
Registered
Joined
·
1,098 Posts
Well perhaps:

1) Is C++ a strongly typed language? (no)
2) Does C++ support operator overloading? (yes)
3) Does C++ support multiple inheritence? (yes)

Which are pretty basic, but for trickier questions, perhaps something like (which is always good for a laugh besides):

4) Whats the mechanism called for allowing one class to access a private member of another class? (friendship)

Etc ... you could always use your friendly C++ FAQ directly for a good trivia source.
 

·
Registered
Joined
·
1,258 Posts
Discussion Starter #6
Heh my C/and C ++ skills are decent... I can write this program... but im school level so it wont be spectacular /forums/images/icons/smile.gif

We just started Java today, seems to be fairly simple, but its the first day of it.
 

·
Registered
Joined
·
1,098 Posts
Ya, I've been there myself. Had to suffer through a couple terms of COBOL/RPG even, what a complete waste of time that was /forums/images/icons/smile.gif.

Ah well, if you can learn C++ well (and I mean understand the reasons *why* multiple inheritence needs to be resolved explicitly, where we use virtuality, etc), then you will not have a problem with most any language you encounter afterwards.

IMO its not soo much how many languages you learn as how well you learn one. Its almost like theres a glass ceiling, and you need to learn one language better in order to grow in the others .. blah blah ...

Anyhow, have fun with Java /forums/images/icons/smile.gif. I love it and won't even give C/C++ a second look any longer -- STL or no.

BTW : www.javagaming.com and www.javaworld.com are great resources!
 

·
Registered
Joined
·
576 Posts
Does C++ make people big cash? Is it brain racking?
 

·
Registered
Joined
·
1,258 Posts
Discussion Starter #9
from what I hear, Also im hearing that ASP is doing well in web/database development
 
G

·
Guest
Joined
·
0 Posts
Does C++ make people big cash?

It's a pretty major language in the computer business, especially for any kind of application development. Many modern OSs are also heavily laden with c++.

Is it brain racking?

I don't know about brain racking -- I think the hardest part is thinking in terms of object design, instead of monolithic design. This applies to any object-oriented language.

I'm in the Objective-C camp myself (by necessity) but have done c++ in the distant past.
 
1 - 10 of 10 Posts
Top