collapse collapse

* Who's Online

  • Dot Guests: 66
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11163
  • stats Total Topics: 1699
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 248

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Luizfe

Pages: [1] 2
1
Hardware Support / Re: Dlink DI-524
« on: March 20, 2010, 10:30:52 pm »
It's ipconfig /all, not ipconfig/all.
Very odd, which Windows are you using that the second doesn't work?

The space shouldn't matter as you can see in my screenshot.

Didn't notice in your screenshot, and I've always used "ipconfig /all" and I have never had problems with that.
Never tried "ipconfig/all" until some seconds ago, which does work.
I just said that because he kept saying the command didn't exist as "ipconfig/all".

2
General Talk / Re: Post your pic v1 thread
« on: March 19, 2010, 10:46:28 pm »
As close as you'll get to see me ;)


3
Hardware Support / Re: Dlink DI-524
« on: March 19, 2010, 10:43:15 pm »
It's ipconfig /all, not ipconfig/all.

4
Although this is kinda off topic, I has that book too.

It's great.

Also, CBA to look for the solution between my source codes.

5
Beta Releases / Re: Showing the results of my Absence
« on: February 07, 2010, 07:45:11 pm »

6
General Talk / Re: Who else isn't watching the superbowl?
« on: February 07, 2010, 06:34:21 pm »
I'm working on stuff :)

And probably going to reboot the server later tonight to get the latest kernel running.

Not watching the SB too.

Reading "Accelerated C++" and playing MW2, instead.

Just like jho said, watching sports through TV is boring, and IMO, has no sense.

Why would you watch sports, and say you're a big fan and sheet, instead of PRACTICING THAT SPORT YOURSELF.

7
General Talk / Re: Happy birthday me!
« on: February 07, 2010, 02:42:00 pm »
LOOOOOOOOOOL.

Happy Birthday!

Weed > Alcohol >:C

8
General Talk / Re: New Years Resolution
« on: January 01, 2010, 04:08:15 pm »
I just noticed. The year 2010 looks so bad ass. But ti brings some random questions to mind. Back in high school, our class always split the two numbers up to make a chant such as
" oh - nine, oh - nine" It had a good light to dark beat to it.

But now, its like
"won - oh" Say it fast and its just reticules. I might go visit my high school just to hear the seniors chant it lol.

Next question, Does anyone else get a futuristic feeling from it now. It seems like we were promised quite a bit for 2010. It was the "future" day where we were on Mars and traveling at the speed of light!

Just some odd ball things lol.

I get a feeling of imminent doom. :)
Time to start making those "It's the end of the world and all I got was this lousy T-Shirt." shirts.

Oh God, I just pooped from laughter.
No seriously, I'm in the bathroom.

9
General Talk / Re: Merry Christmas, Happy Holidays!
« on: December 30, 2009, 12:19:24 am »
Happy Holidays.

I got an Xbox 360 Elite Limited Edition: Modern Warfare 2, Accelerated C++ (thanks, Jho, for the tip), The Golden Circle (a book), some Hollister and Aeropostale clothes.

10
Humor / Re: Rowan Atkinson SO FUNNY
« on: December 10, 2009, 11:21:37 am »
I can't believe how comedians can tell fudging funny jokes, with secksual innuendo, yet, with such a straight face.

11
C++ / Re: [15] Recursion
« on: December 08, 2009, 08:54:56 pm »
Yes, I do know that (integer)++ means plus one.

Ah, by that I meant the additional 1 added to the variable so it gives you 1 more then you normally expected.

I know, I know.

I got it 15 minutes after reading it.

12
Beta Releases / Luizfe's Text-Based MonsterKilling BETA
« on: December 08, 2009, 08:47:40 am »
Well, I was reading the 16th C++ tutorial, and I was bored, so, I made this with the knowledge of C++ that I have so far.

It's pretty much basic.

Code: C++
  1. #include <iostream>
  2. #include <windows.h>
  3. using namespace std;
  4.  
  5. void Damage();
  6.  
  7. int monsterdmg = rand()%4;
  8. int playerhp=15;
  9. int monster=10;
  10. int type=1;
  11. int damage = (type==1)?(2):(1);
  12. string strSelection;
  13. string stryes = "y";
  14. string strYes = "Y";
  15.  
  16. void Damage(){
  17.      srand (GetTickCount());
  18.      cout << "\nDealing " << damage << " damage!\n";
  19.      monster -= damage;
  20.      cout << "\nThe monster has " << monster << "HP!\n\n";
  21.      cout << "The monster attacks back!\nIt deals " << monsterdmg << " damage!\n";
  22.      playerhp -= monsterdmg;
  23.      cout << "\nYou now have " << playerhp << "HP!";
  24.      if(monster>1){
  25.                   cout << "\n\nDo you want to attack again? Y/N\n";
  26.                   cin >> strSelection;
  27.                   if(strSelection==strYes, strSelection==stryes){
  28.                                            Damage();
  29.                   }
  30.                   else {
  31.                        cout << "You flee the battle.";
  32.                   }
  33.       cin.ignore();
  34.       getchar();
  35.      }
  36. }
  37.  
  38. int main(){
  39.       cout << "A monster appeared!\nIt got " << monster << "HP!\n";
  40.       cout << "Attacking monster! ";
  41.       cout << "Monster is of the type " << type << endl;
  42.       Damage();
  43.       return 0;
  44. }

P.S: Use y (small caps) for yes, n (small caps) for no.
P.S.S: It comes with the .cpp, so you can see the code and help me/suggest me new stuff, but, there's the .cpp code on the post, if you're lazy to dl it.

13
C++ / Re: [15] Recursion
« on: December 08, 2009, 07:44:05 am »
Lol, good catch, that i++ should be MonsterCount++;

Also, that sign causes that +1 to happen.
It means less that or equal to, then perform this.
Meaning if the value is 100 then your asking this.
IS 100 less than or equal to 100? That is true. Thus it performs the loop once more.

Yes, I do know that (integer)++ means plus one.

And thank you for clearing out the <= doubt.

+rep, although I doubt you need it.

14
C++ / Re: [15] Recursion
« on: December 08, 2009, 07:22:58 am »
Code: [Select]
#include <iostream>
using namespace std;
/*******************************************
In this tutorial ,we will learn about recursion.
Recursion is where a function will call itself from inside
itself.
********************************************/
int MonsterCount=0;

void CreateMonster()
{
cout << "Recursion happened ["<< i <<"] times.\n";
i++;
if(MonsterCount<=100) // Check our condition
CreateMonster(); // Recursion occures here. IF this was infinite, sooner or later, the computer would crash the program.
}


int main()
{
CreateMonster(); // We call our monster create function
system("pause");
return 0;
}

This, is your original code, C&P'ed.
I still have a few doubts about this, although yes, I read the whole thread.

1. The integer i was never declared.
2. In the CreateMonster void, shouldn't you have declared MonsterCount++;? Then how would the program ever stop, since "if (MonsterCount<=100)" would never end, if you didn't add 1 to the MonsterCount each time?


I think, this would've been a great way, in my point of view, to do this.
Correct me if I'm wrong, I'm just trying to clear my mind about this:

Code: C++
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int MonsterCount=0;
  5. int i=1;
  6.  
  7. void CreateMonster(){
  8.      cout << "Recursion has happened [" << i << "] times!\n";
  9.      i++;
  10.      MonsterCount++;
  11.      if (MonsterCount<=99) // For some weird reason, when I use 99, the number gets to 100, and when I use 100, the number goes up to 101.
  12.         CreateMonster();     // Probably because of the <= sign, but I'm really not sure.
  13. }
  14.  
  15. int main(){
  16.     CreateMonster();
  17.     system("pause");
  18.     return 0;
  19. }
  20.  


15
C++ / Re: [4] For Loops!
« on: December 07, 2009, 09:12:05 pm »
Well jho, I thought the same as you about while and for loops (as in, they're basically the same), but bro, you just fudged (autocensored)  up my mind about following snippets.
Still trying to figure out THOSE .cpp you wrote.

I think you're kind of contradicting yourself with those statements. For loops _are_ exactly like while loops, so I can't see the problem in understanding those.

Code: C++
  1. for(initializer; conditional; incremental) { code; }
is identical to
Code: C++
  1. initializer;
  2. while(conditional)
  3. {
  4.     code;
  5.     incremental;
  6. }

So, for example my second snippet is identical to this:
Code: C++
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(void)
  5. {
  6.     string s;
  7.     int i = 1;
  8.     while(s.find("exit") == string::npos)
  9.     {  
  10.         if(s.length() > 0)
  11.             cout << "You typed in " << s << ".\n";
  12.         cout << "Iteration " << i << ". Type \"exit\" to stop. ";
  13.         cin >> s;
  14.         ++i;
  15.     }  
  16. }
  17.  

Both versions seem clear as a day to me.
I meant, that, YES, I do agree with you on the equality of the for and while loops.
I meant, in the two final snippets, you wrote syntax, which, at the moment, is unknown for me.

16
C++ / Re: [10] Time for a review!
« on: December 07, 2009, 05:18:26 pm »
I know we should have made this calculator with the information given to us on the past 9 tutorials.
Sadly, I already had made the calculator before reading the Functions tutorial.
Meh, couldn't add that.
Besides that, I don't think I missed anything.
Works for me:
Code: C++
  1. #include <iostream>
  2. #include <string>
  3.  
  4. #define ResultMessage "\nYour answer is: "
  5. #define ADD(a,b) (a+b)
  6. #define SUB(a,b) (a-b)
  7. #define MUL(a,b) (a*b)
  8. #define DIV(a,b) (a/b)
  9.  
  10. using namespace std;
  11.  
  12. int main() {
  13.     int x;
  14.     int y;
  15.     int i;
  16.     int z;
  17.    
  18.     cout << "Enter two numbers!: \n";
  19.     cin >> x;
  20.     cin >> y;
  21.     cout << "\nEnter the correct number for the operation you wish to perform! \n1. Addition\n2. Substraction\n3. Multiplications\n4. Divisions\n";
  22.     cin >> z;
  23.     switch (z){
  24.            case 1:
  25.                 i= ADD(x,y);
  26.                 cout << ResultMessage << i << ".";
  27.                 break;
  28.            case 2:
  29.                 i= SUB(x,y);
  30.                 cout << ResultMessage << i << ".";
  31.                 break;
  32.            case 3:
  33.                 i= MUL(x,y);
  34.                 cout << ResultMessage << i << ".";
  35.                 break;
  36.            case 4:
  37.                 i= DIV(x,y);
  38.                 cout << ResultMessage << i << ".";
  39.                 break;
  40.            default:
  41.                    cout << "Error! Try again.";
  42.                    }
  43.      cin.ignore();
  44.      getchar();
  45.      return 0;
  46. }
  47.  

17
C++ / Re: [6] Calculations and Operatons
« on: December 07, 2009, 04:07:58 pm »
cannot understand.
 AT ALL.

Although yes, I did notice that this post was written almost half a year ago, and I'm supposing you already got it, I'll explain everything for those who don't understand.

Code: C++
  1. int main()
  2. {
  3.         int i=1; // As I'm supposing, you do know that int means integer, which can only hold a number, as in this case, the "i" integer equals 1
  4.         int x=2; // Same here, x equals 2
  5.         int y=3; // Again, y equals 3
  6.        
  7.         i += 2;         // 3, since, as Key wrote, *(the integer) += #, equals the integer plus the number (i += 2 equals i = i + 2, which is i = 1 + 2, which again, is 3. Also, this, written below the integer values, means that you're modifying the original value, making a mathematical operation with it.
  8.         x -= 2;         // 0, read explanation above, just with a minus symbol.
  9.         y++;    // 4, since (integer)++ means the integer, plus one (y++, is y = y + 1, which is y = 3 + 1, which equals 4).
  10.  
  11.         cout << "Variable i = " << i << endl; // This one should be obvious, you're printing something on the console application, BUT, taking the "i" value after the mathematical operation stated after the original value given.
  12.         cout << "Variable x= " << x << endl; // Same explanation as above.
  13.         cout << "Variable y= " << y << endl; //Ditto
  14.  
  15.         getchar();
  16.         return 0;
  17.  
  18. }

18
C++ / Re: [5] Conditional Statements
« on: December 07, 2009, 03:29:49 pm »
Actually, there is a way to avoid using system("pause") (I mean, a way to avoid that's obvious for those with some experience, but not so obvious for people like those who are learning C++ for the first time):
Code: C++
  1. #include <iostream>
  2.        
  3. using namespace std;
  4.  
  5. int main() {
  6.     int intChoice;
  7.    
  8.     cout << "What is the password? \n";
  9.     cin >> intChoice;
  10.    
  11.     switch (intChoice)
  12.     {
  13.            case 1:
  14.                 cout << "Incorrect!";
  15.                 break;
  16.            case 2:
  17.                 cout << "Incorrect!";
  18.                 break;
  19.            case 3:
  20.                 cout << "Incorrect!";
  21.                 break;
  22.            case 4:
  23.                 cout << "Incorrect!";
  24.                 break;
  25.            case 5:
  26.                 cout << "Correct!one!!eleven!";
  27.                 break;
  28.            default:
  29.                    cout << "The hell bro?";
  30.                    break;
  31.      }
  32.      cin.ignore(); // This is the new line, which makes us avoid using the system commands.
  33.      getchar();
  34.      return 0;
  35. }
  36.  

I was, at first, wondering, about "What if the number is OVER 5, which isn't included in any case.
I started doing stuff, until I kept reading the thread, where Key said to use the default.

19
C++ / Re: [4] For Loops!
« on: December 07, 2009, 03:10:15 pm »
These loops are not as pretty as while loops, but they themselves are life savers for the CPU. Unlike while loops which consume resources like they are going to die. For lops are a bit more friendly.
I can't see where you would've gotten this idea from. Both loops just execute the body, evaluate the conditional statement, and either re-execute the body or move on. With ints this is just a few cmpl and conditional jumps. Example (made in C to filter out bloat from the resulting Assembly code):

for.c
Code: C
  1. int main(void)
  2. {
  3.     int i;
  4.     for(i = 0; i < 10; i++)
  5.     {  
  6.         puts("example");
  7.     }  
  8.  
  9.     return 0;
  10. }
  11.  

while.c
Code: C
  1. int main(void)
  2. {
  3.     int i = 0;
  4.     while(i < 10)
  5.     {  
  6.         puts("example");
  7.         i++;
  8.     }  
  9.  
  10.     return 0;
  11. }
  12.  

Not so surprisingly the resulting Assembly code is identical for both files. Unneeded miscallaneous parts stripped off
Code: [Select]
   .section    .rodata
.LC0:
    .string "example"
    .text
.globl main
    .type   main, @function
main:
.LFB2:
    pushq   %rbp
.LCFI0:
    movq    %rsp, %rbp
.LCFI1:
    subq    $16, %rsp
.LCFI2:
    movl    $0, -4(%rbp)
    jmp .L2
.L3:
    movl    $.LC0, %edi
    movl    $0, %eax
    call    puts
    addl    $1, -4(%rbp)
.L2:
    cmpl    $9, -4(%rbp)
    jle .L3
    movl    $0, %eax
    leave
    ret


Quote
using boolean values here would not be sucha  great idea. The implementation would be too troublesome, so stay away form that. Strings also are not so good to use for loops with. Dont get me wrong now, using them nest (inside) the loop is a good idea, but using them in the for(-----) part is not so wise.
How are either of the following snippets "troublesome"?

Code: C++
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(void)
  5. {
  6.     int i = 0;
  7.     for(bool c = true; c != false; )
  8.     {  
  9.         cout << ++i << endl;
  10.         if(i >= 10)
  11.             c = false;
  12.     }  
  13.     return 0;
  14. }
  15.  

Code: C++
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(void)
  5. {
  6.     string s;
  7.     for(int i = 1; s.find("exit") == string::npos; ++i)
  8.     {  
  9.         if(s.length() > 0)
  10.             cout << "You typed in " << s << ".\n";
  11.         cout << "Iteration " << i << ". Type \"exit\" to stop. ";
  12.         cin >> s;
  13.     }  
  14. }
  15.  

Well jho, I thought the same as you about while and for loops (as in, they're basically the same), but bro, you just fudged (autocensored)  up my mind about following snippets.
Still trying to figure out THOSE .cpp you wrote.

20
Beta Releases / Re: C++'s Random Song.
« on: November 15, 2009, 12:28:07 am »
It is, in my opinion, fudge pro.

21
Beta Releases / Re: Coding in Binary
« on: November 15, 2009, 12:23:34 am »
Although I won't use it in the near time, I like how fast and efficiently you work.

/repped

22
Visual Basic / Read D:
« on: November 14, 2009, 07:15:11 pm »
We have no VB tuts here.

I'll be happy if someone could help me with it, because I feel like starting from simple (VB) to more complex (C++)

Either if you could write a tutorial, link me to a good tutorial, etc.

Thanks in advance,
Luizfe.

23
Humor / Re: A cow from PETA... who talks...
« on: November 13, 2009, 02:03:40 pm »
Then damn you, I thought you actually did :(

24
Humor / Re: The Gift - A poo story. [HILARIOUS]
« on: November 13, 2009, 01:59:07 pm »
I just frosting lol'd.

Once, when I was in the 5th grade, a 1st grader came to me in the bathroom and told me "Watch this", pointing at a toilet.

There was this big, morbid monster made of fecal matter.
Either way, the big monster you talked about makes me feel that the one I saw was like a marble compared to a dryer, that being your uber fecal matter (although it was left by a NASTY person.)

25
Updates / Re: Updated forums
« on: November 12, 2009, 09:19:08 pm »
I'm a gnatzi. (Grammar Natzi [although yes, I know it's Nazi])

I can help :D

26
C++ / Re: Links for C++ tutorials in order
« on: November 12, 2009, 07:57:02 pm »
Lol, thanks for this.

/repped

27
2D Graphics / Re: [Luizfe] Most recent tag.
« on: November 11, 2009, 09:52:46 pm »
eh...

I didn't render that pose, I got it from Planet Renders

28
2D Graphics / [Luizfe] Most recent tag.
« on: November 11, 2009, 09:19:02 pm »


fuxpro.

if you want one, hit me up.

29
General Talk / Re: Private School
« on: November 03, 2009, 09:39:26 pm »
Kinda sad, but kinda good, because you can start all over again.

Meh, it's happening to me too, next year moving somewhere else.

30
General Talk / Re: My education thus far
« on: November 01, 2009, 10:27:35 pm »
Pretty impressive.

What exactly were/are you studying?

Pages: [1] 2

Donate


* Search


* Recent Posts

Image Comparison by Shishka
[May 15, 2017, 01:18:02 pm]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 pm]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 am]


Updates by Nathan
[October 30, 2015, 08:27:36 pm]


Re: Client-Server Messaging by Nathan
[October 25, 2015, 05:48:57 pm]