Mathematical ability and C/C++

This is a discussion on Mathematical ability and C/C++ within the C++ Programming forums, part of the General Programming Boards category; Yah, my tech teacher just sits out the front and says " make sure to do a good job ", ...

  1. #46
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    Yah, my tech teacher just sits out the front and says " make sure to do a good job ", and expects us to do everything perfectly without help or anything.
    Most of the time they aren't ad guys/girls, but they just don't know how to teach properly.
    Advanced computing (programming) was cancelled at my school because they said " We are not happy with the mathematical abilty of most of the people that want to do it"

    lamers

    ~

    btw, we actually caught our teacher downloading porn off the school network.

  2. #47
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    hmmm... well i do know that bloodshed doesn't support interrupts! ah! and djgpp is dos... so... have at it...
    hasafraggin shizigishin oppashigger...

  3. #48
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    interrupts?, you mean pauses?

  4. #49
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    >interrupts?, you mean pauses?

    lol, nope... [laughing with you...realizing tech-involvement] interrupts are... hmm... you'd figure a DOS-nut like me would have a textbook def tatooed on my typing hand index fingure... but no...

    they stop program execution to do something... like, everytime you press a key or click your mouse, your program halts... and does something based on the stoppage... you can't tell since it's so fast though. but it happens...
    hasafraggin shizigishin oppashigger...

  5. #50
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    I see, so it's sort of like a refresher rate?, but very quick.?

  6. #51
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    Also, what is the " Assembly language " ?, i've heard its more complicated and isn't as easy to read as C++.
    ~Thank you~

    some have it, some don't, watch out for those who do....

  7. #52
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    This is assembly language, nasm on linux, I
    hope I don't make any mistakes as I'm just learning
    it.

    Code:
    %define STDOUT 1
    %define SYS_EXIT 1
    %define SYS_WRITE 4
    
    ; these are directives not part of the intel instruction set
    section .data
    msg: db "hello", 10  ; declare byte 
    len: equ $-msg        ; calculate number of bytes by subtracting addresses
    
    section .text
    global _start
    _start: 
               ; Call write 
               mov eax, SYS_WRITE
               mov ebx, STDOUT
               mov ecx, msg
               mov edx, len
               int 080h                  
    exit:
               ; Call exit
               mov eax, SYS_EXIT
               mov ebx, 0
               int 080h
    This code should be easy to understand as
    it's just calling c and unix system calls but
    when you get to loops and such then it gets more
    complicated and you need to comment. Alot of
    it is really similar to c like you can use [] to dereferance
    a pointer etc.

    djgpp and dev-c++ both use the same compiler but different
    ports of it. I didn't like dev-c++ because they
    didn't code the ide in c++ and the ide crashed a few times on
    me. It's still better than alot of other ide's. I'll try it
    again and see if it's more stable. Borland's free
    compiler doesn't come with a ide so you will have to find a text editor to write code.

  8. #53
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    I see, also, does a "loop" = recursion?
    ~Thank you~

    some have it, some don't, watch out for those who do....

  9. #54
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Any loop can be written recursivly.

    When you say a recursive procedure you mean a
    procedure which calls it's self.
    When most people say loop they mean any
    language construct such as goto, while, for, repeat, do while though
    there are some languages such as lisp where every loop must be
    written as a recursive procedure.

  10. #55
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    >> NICK: (("Any loop can be written recursivly.
    When you say a recursive procedure you mean a
    procedure which calls it's self."))

    "calls its self"?

    Do you mean that it owns something?

    or is it a procedure that is a function?

  11. #56
    Registered User
    Join Date
    Aug 2001
    Posts
    154
    Originally posted by UneducatedOne
    >> NICK: (("Any loop can be written recursivly.
    When you say a recursive procedure you mean a
    procedure which calls it's self."))

    "calls its self"?

    Do you mean that it owns something?

    or is it a procedure that is a function?
    foo(int x)
    {
    x++;
    foo(x);
    }

    This would produce an infinite recursion, not good, but the idea is shown.

  12. #57
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    I see, is that the only way to write it?
    ~Thank you~

    some have it, some don't, watch out for those who do....

  13. #58
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    DevC++ doesn't support interupts just because Windows doesn't support them. Windows just supports 'int 3' if I'm right.
    // Gliptic

  14. #59
    Registered User UneducatedOne's Avatar
    Join Date
    Sep 2001
    Posts
    57
    So if windows supported interrupts, devC++ would also?
    ~Thank you~

    some have it, some don't, watch out for those who do....

  15. #60
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Probably
    // Gliptic

Page 4 of 7 FirstFirst 1234567 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21