To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 5891
5890  |  5892
Subject: 
Help with pointers
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 25 Mar 1999 16:00:55 GMT
Original-From: 
Thomas Hauri <thomas.hauri@zhwin.ch=NoMoreSpam=>
Viewed: 
678 times
  
Hi all
little question:

How can I ad a value to a pointer ??

int *px, x;

px = &x;

px = px + 1;   (????? pointing to the lowbyte of x for example)

Is it just NOT possible with IC or am I missunderstanding anything ????

Thanks for any help.

--
Thomas Hauri
ZHW Zuercher Hochschule Winterthur
University of applied sciences
Technikumstr.9 /PF
CH-8401 Winterthur
Switzerland

Phone : +41 52 267 74 79
Fax    :  +41 52 268 74 79
Mail  :   Thomas.Hauri@zhwin.ch
HP    :   http://www.zhwin.ch



Message has 1 Reply:
  Re: Help with pointers
 
(...) When you do pointer arithmatic, you work in increments of what the pointer points to. So if you have a pointer to an int, as in the above example, when you add one to it, you actually make it point to the next int, not the next byte or word. (...) (25 years ago, 25-Mar-99, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR