www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/17/04:30:16

From: h2owong AT hknet DOT com (¤ý¤ô)
Newsgroups: comp.os.msdos.djgpp
Subject: Question about pass by pointer
Date: Thu, 17 Sep 1998 08:32:44 GMT
Organization: Water World
Reply-To: h2owong AT hknet DOT com
Message-ID: <3600c4ec.1308545@news.hknet.com>
MIME-Version: 1.0
NNTP-Posting-Host: 202.67.249.239
Lines: 15
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	void change(char *n){ 
	    *n=70; 
	}
	int main(){
	    char Number=0;
	    printf("Number=%i\n",Number);
	    change(&Number);
	   printf("Number=%i\n",Number);
	   return 0;
	
What I want to ask is that when the address of Number pass to function
"change", the address value will store in var 'n' , but not '*n' ?!

Damn, I don't know how to say it....... :(

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019