Jump to content

someboddy

Ultra Members
  • Posts

    1,661
  • Joined

  • Last visited

Everything posted by someboddy

  1. We allready have a mugen forum.
  2. Since I don't have DVD burner, I am going to rip my spiderman2 ISO when I finish downloading it out of it's movies. Is there any way I can watch them on my PC (or on my box, outside of the game)
  3. After one much, the menu's options looks alittle fade. That's not much of a problem for itself, but in the option menu and the rules menu you can't see which option is set to what, so I can't config the rules. I tried both 1964 and Project64.
  4. One of the most powerfull tools in programing is the arrays. Array is basicly a bunch of variables of the same type, that each one of them has an index. index|value -----+----- 0 | 35 -----+----- 1 | 48 -----+----- 2 | 1 -----+----- 3 | 119 -----+----- 4 | -48 This is an integer array with 5 cells. The index in C++ is allways starting by 0. This is how it is done in C++: int a[5]; 5 is the number of cells, so the index of the last cell is 5-1=4, since it's starts from 0. If you want to use the arrays cells, you do it like this: a[2]=5; cout<<a[3]; Just like normal variables. So why to use arrays? Inside the [], you can put variables!!! so: int a[5],i=3; a[i]=10;//same as a[3]=10; You can also use arrays with the counter of for loops. This is the most common use for arrays: int a[70]; for(int i=0;i<70;i++) cin>>a[i]; In few rows we got input for 70 variables. Now I will show you a complicated program compared to what we have done so far: #include<iostream.h> void main() { int a[7],counter=0; float avg=0; for(int i=0;i<7;i++) { cout<<"\ngive me a number "; cin>>a[i]; avg+=a[i]; } avg/=7; for(i=0;i<7;i++)//note that I didn't declare i, since its already declared if(a[i]>avg) counter++; cout<<endl<<counter<<" numbers are bigger than the avagreage\n"; } We store the values in array, because we don't know what the avagrage is before we get all the values. That will be all for today. Class dismissed.
  5. Integer is not the only type of variable. Here are few other: char ch='t'; cout<<ch; The output will be "t". Note that the 't' is inside single commas. chars are inside single commas, strings(text) are inside inverted commas. char is basicly the ascii number of that sign, so you can use it as regular number like this: char ch='b'; ch++; cout<<ch; the output will be "c", because 'b'+1='c'. You can get char input like this: char ch; cin>>ch; Just like integers. Other type of variable is the float. Integers are for complete numbers. floats are for real numbers, so they can contain fractions. Otherwise, floats are used just like integers, so you can write: float f1=2.3,f2=4.6; f1+=f2; cout<<f1+f2; ect. Run this program: #include<iostream.h> void main() { float f; f=5/2; cout<<endl<<f<<endl; } the output is "2"!!! The problem is, that when dealing with integers, the result is integer. 5/2 is int/int, so the result is int. to get corrent answer, write: #include<iostream.h> void main() { float f; f=5.0/2; cout<<endl<<f<<endl; } 5.0 is float, so the result is float. if you do it with variables, just multiple the first number by 1.0, like this: #include<iostream.h> void main() { int a; cout<<"\n enter a number "; cin>>a; float f=1.0*a/2; //or float f=a/2.0; cout<<endl<<f<<endl; } If a is not even, you will get a fraction. That will be all for today. Class dismissed.
  6. Then close it so no one can bump it. Done
  7. Get some friends of you (up to 3) to download No$GBA and the ROM, and play with them online.
  8. I want to install a new dashboard on my box. What dashboard do you think is the best? Please write the latest version, and if possible, give me a download link.
  9. Actualy, I dind't istalled it yet. I just don't want to install it if its still in the background while you play games.
  10. The catakomb soundtrack from castlevania circle of the moon.
  11. The for loop is usualy used if you know how many times your loop is going to loop. When I say "you know", I don't mean you know the number when you write the program. You can allso have the number inside a variable. for(/*reset code*/;/*expression*/;/*advancing code*/) { /*code*/ } reset code: will be executed once, before the loop is started. expression: the loop will continue as long as the expression is true. advancing code: will be executed at the end of every cycle of the loop, right befor the expression is checked. So if you want a loop to loop 4 times, you write: for(i=0;i<4;i++) { /*code*/ } i is usualy used with for loops. If you need to make one loop inside another, use j fo the second loop. i allso contain's the number of the cycle, so we can use it. #include<iostream.h> void main() { for(int i=0;i<10;i++) cout<<i; } The output will be "0123456789" I decalred i inside the loop. This is usualy done in C++, since we don't want variables without values. That will be all for today. Class dismissed.
  12. You can't play Four Swords alone.
  13. Can I use a system link cable for this?
  14. If I install a new dashboard on my board, will it make my games slower?
  15. Now will be a good time for some stuff to small for their own topic. You can set the value of variable when you declare it like this: int a=4; int b=1,c,d=5; This is done alot in C++. There are few short ways to change the value of variable: "a++" is the same as "a=a+1" "a--" is the same as "a=a-1" "a+=b" is the same as "a=a+b" "a-=b" is the same as "a=a-b" "a*=b" is the same as "a=a*b" "a/=b" is the same as "a=a/b" "a%=b" is the same as "a=a%b" What is % you ask? % is the reminder you get when dividing. So: 5%2=1 4%2=0 3%4=3 ect. iif you want to go down one line in the output (the screen), you do it like this: cout<<"first line"<<endl<<"second line"; or cout<<"first line\nsecond line"; \something can do many things inside text. For example: '\a' beeps. \number is the sign assigned the the number in ascii code. If you want just \, type '\\'. That will be all for today. Class dismissed
  16. The next loop is the do...while loop. it goes like this: do { /*code*/ } while(/*expression*/); The only diffrent between while and do...while is the do...while's code will be executed at least once. so the output of: do { cout<<"1"; } while(2<1); will be "1", and the output of: while(2<1) { cout<<"1"; } will be "". You can use it to check values you don't know yet, like: #include<iostream.h> void main() { int num; do { cout<<"enter a number "; cin>>num; } while(num!=1); cout<<"you finaly entered 1"; } The value of num is unknown at the begining, but it doesn't metter, because the loop will be executed once anyways.
  17. Because It's Already Bumped, FINALLY A Dude With Real Brains For Weapons! And RPG's Are Used By Terrorists! Are You A Terrorist? Well...
  18. Did you connected you gba to other gba which the game?
  19. Next, are the loops. The most simple loop looks like this: while(/*expression*/) { /*code*/ } You don't have to use {} if you only put one command inside the loop. Explenation: the code will be executed as long as the expression is true. So: int i; i=0; while(i<10) i=i+1; The code "i=i+1" will be executed 10 times i=0,i=1,i=2,i=3,i=4,i=5,i=0,6=1,i=7,i=8,i=9. When i=10 "i<10"="10<10" is false. So lets make a simple program: #include<iostream.h> void main() { int sum,count,num; sum=0; count=0; while(sum<20) { cout<<"Enter number "; cin>>num; sum=sum+num; count=count+1; } cout<<"You entered "<<count<<" numbers before their sum reached to 20"; } That will be all for today. Class dismissed
  20. RYL Great 3D MMORPG.
  21. Thats great
  22. There are more things you need to know about conditions. First, condition expressions return numbers, 1 is true and 0 is false, so you can store it in integers. The if expression will treat to every non zero value as true, so if(4) cout<<"4"; if(-14) cout<<"-14"; will print "4-14". There are few logical operators to combine expressions. &&: the and operaor. a&&b will return true only if both a and b are true. ||: the or operator. a||b will return true if none of the values a or b are false. !: the not operator. !a will return true if the value of a is false. So (1<2)&&(2<70) (4>2)||(1<0) !(1>2) are all true, and (4<2)&&(7<10) (3>8)||(6<4) !(5>1) are all false. So lets combine what we learned: #include<iostream.h> void main() { int a,b1,b2; cout<<"enter the first number"; cin>>a; b1=(a<100)&&(a>0); cout<<"enter the second number"; cin>>a; b2=(a<100)&&(a>0); if(b1||b2) cout<<"at least one of the numbers is between zero and 100"; } That will be all for today. Class dismissed
  23. I hate jelyfish. They are the worst thing on earth after mosquito's.
  24. I got my RPG (I'm not talking about Final Fantasy)
×
×
  • Create New...