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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'?

error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • G Offline
    G Offline
    gentleguy
    wrote on last edited by
    #1

    dear all i am doing image processing, when i would like to convert RGB to grayscale, Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'? anyone help me? thanks

    Li Zhiyuan

    CPalliniC C R 3 Replies Last reply
    0
    • G gentleguy

      dear all i am doing image processing, when i would like to convert RGB to grayscale, Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'? anyone help me? thanks

      Li Zhiyuan

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      The message is descriptive enough: you're trying to assign an integer to a pointer. Please post Y, R, G, B declarations for further help. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • G gentleguy

        dear all i am doing image processing, when i would like to convert RGB to grayscale, Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'? anyone help me? thanks

        Li Zhiyuan

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        You are trying to convert from a pointer to integer to an integer. And the conversion is not possible. The error message was quite clear enough, don't you think ?

        Cédric Moonen Software developer
        Charting control [v1.3 - Updated]

        1 Reply Last reply
        0
        • G gentleguy

          dear all i am doing image processing, when i would like to convert RGB to grayscale, Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'? anyone help me? thanks

          Li Zhiyuan

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #4

          li zhiyuan wrote:

          Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'?

          change to, *Y = 0.3*R + 0.59*G + 0.11*B; :) :-D

          G 1 Reply Last reply
          0
          • R Rajkumar R

            li zhiyuan wrote:

            Y = 0.3*R + 0.59*G + 0.11*B, the error occurred below: error C2440: '=' : cannot convert from 'unsigned int' to 'unsigned int *'?

            change to, *Y = 0.3*R + 0.59*G + 0.11*B; :) :-D

            G Offline
            G Offline
            gentleguy
            wrote on last edited by
            #5

            thanks friend how to convert RGB image to grayscale and let RGB value become one value, for example, [(r,g,b),(r,g,b)]to [a,b], thanks a lot, however i tried, but can't, sorry in this area i am so weak.

            Li Zhiyuan

            R 1 Reply Last reply
            0
            • G gentleguy

              thanks friend how to convert RGB image to grayscale and let RGB value become one value, for example, [(r,g,b),(r,g,b)]to [a,b], thanks a lot, however i tried, but can't, sorry in this area i am so weak.

              Li Zhiyuan

              R Offline
              R Offline
              Rajkumar R
              wrote on last edited by
              #6

              you tried something and end up with error, if you can post your code, i will try to direct.

              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