QUOTE(Mononoko @ Jul 7 2007, 02:09 PM)

were doing a course in ICT called multimedia, but i dont know how to define variables
and whenever i ask my teacher he always goes
"were not that far yet"
he doesn't even look at what i have done, assumes I'm not finished, when i am, the only thing i need now is a scoring system
I'm guessing C++ is the language you are using.
CODE
type name;
Where type is the type of variable. Where name is the name of the variable. The type can be int for integers, float for real numbers, char for characters(it will only store one character if it isn't an array or pointer), and a host of various other types that you might not find useful under normal circumstances at this point. This is the basic way to declare variables in any C-like language(Java, C, C++, mainly) but PHP, and Perl which don't require variables to be defined.
To assign a variable a value:
CODE
name = value;
Remember to put these in your functions like main() or it will be a global variable. Global variables are frowned upon in C.
Reply