Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Matrix! HELP!!!!

Matrix! HELP!!!!

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sunnygirl
    wrote on last edited by
    #1

    hello @all, i want to make a two dimensional matrix. how can i do this? can anybody help me? thank you very much sunny

    V D 2 Replies Last reply
    0
    • S Sunnygirl

      hello @all, i want to make a two dimensional matrix. how can i do this? can anybody help me? thank you very much sunny

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      Do you want a static matrix or a dynamic matrix? Kuphryn

      A 1 Reply Last reply
      0
      • S Sunnygirl

        hello @all, i want to make a two dimensional matrix. how can i do this? can anybody help me? thank you very much sunny

        D Offline
        D Offline
        Dominik Reichl
        wrote on last edited by
        #3

        A chessboard matrix: unsigned char pChess[8][8]; To access element 5,1 you would do it like this: unsigned char u = pChess[1][5]; Dynamic matrix creation is a bit more difficult... :-D -Dominik


        _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;)

        A 1 Reply Last reply
        0
        • V valikac

          Do you want a static matrix or a dynamic matrix? Kuphryn

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          thanks for reply. i want a dynamic matrix! thank you very much!!! sunny

          V 1 Reply Last reply
          0
          • D Dominik Reichl

            A chessboard matrix: unsigned char pChess[8][8]; To access element 5,1 you would do it like this: unsigned char u = pChess[1][5]; Dynamic matrix creation is a bit more difficult... :-D -Dominik


            _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;)

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            hello, thanks for reply!!!!! but i need a dynamic matrix! can you help me? thank you very much! sunny

            1 Reply Last reply
            0
            • A Anonymous

              thanks for reply. i want a dynamic matrix! thank you very much!!! sunny

              V Offline
              V Offline
              valikac
              wrote on last edited by
              #6

              Okay. Here is an example of a two-dimensional array of char using dynamica allocation. unsigned int nSize = 100; char *text = new char*[nSize] for (unsigned int i = 0; i < nSize; ++i) text[i] = new char[nSize]; ... // Deallocation Kuphryn

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups