Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/20/07 16:27
Read: times


 
#147271 - Explaining
Responding to: ???'s previous message
Andy Neil said:

But if you then use that pointer to point to a non-const you will probably get the error (or its converse) there instead!


I don't know if it would generate an error if you pointed it to a non-const, but as soon as you tried to change the value it pointed to you would get an error.

Andy Neil said:

That's the basic flaw: Stefan is trying to use a single pointer to point to both const and non-const objects...


If he wants one pointer to do both (point to a constant and non-consant), then he has a problem. The reason I posted the explanation was because I wasn't sure if he knew there was a way to declare a pointer to a const.

List of 27 messages in thread
TopicAuthorDate
Sequence of learning 8051, asm and C            01/01/70 00:00      
   2 Issues            01/01/70 00:00      
      my wrong path            01/01/70 00:00      
         OT, but            01/01/70 00:00      
            OT - error message            01/01/70 00:00      
               Use the tags            01/01/70 00:00      
                  single-character const            01/01/70 00:00      
                     QED?            01/01/70 00:00      
                        As Erik suggests            01/01/70 00:00      
                           Just learning - too luxury.            01/01/70 00:00      
                              how can that be "too luxorious"            01/01/70 00:00      
                              Foolish builder?            01/01/70 00:00      
               pointer to a const            01/01/70 00:00      
                  True, but...            01/01/70 00:00      
                     Explaining            01/01/70 00:00      
                        helpfull ,thanks, but..            01/01/70 00:00      
                           Declaration            01/01/70 00:00      
                              thanks            01/01/70 00:00      
                                 Adjust declaration            01/01/70 00:00      
                                    thanks again            01/01/70 00:00      
                  const            01/01/70 00:00      
         no wrong path            01/01/70 00:00      
   learning C            01/01/70 00:00      
      Freebies            01/01/70 00:00      
      Erik is right            01/01/70 00:00      
         not necessary            01/01/70 00:00      
   You\'re skipping the most important step ...            01/01/70 00:00      

Back to Subject List