| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| cjusto 
 
 
 Joined: 26 Apr 2006
 Posts: 38
 Location: Portugal
 
 
			    
 
 | 
			
				| what does this operator do??? |  
				|  Posted: Thu Jun 01, 2006 3:47 pm |   |  
				| 
 |  
				| hi!! can someone help me with this operator??
 
 "->", this comand (it looks like an arrow pointing right).
 
 
 i know that is used with arrays, but what is it's real function?
 
 thanks
 |  | 
	
		|  | 
	
		| kender 
 
 
 Joined: 09 Aug 2004
 Posts: 768
 Location: Silicon Valley
 
 
			          
 
 | 
			
				| Re: what does this operator do??? |  
				|  Posted: Thu Jun 01, 2006 4:00 pm |   |  
				| 
 |  
				|  	  | cjusto wrote: |  	  | "->", this comand (it looks like an arrow pointing right). 
 i know that is used with arrays, but what is it's real function?
 | 
 
 First you have to swear with your tomorrow's lunch that this is not a homework question.
 |  | 
	
		|  | 
	
		| treitmey 
 
 
 Joined: 23 Jan 2004
 Posts: 1094
 Location: Appleton,WI   USA
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Thu Jun 01, 2006 4:06 pm |   |  
				| 
 |  
				| structure pointer operator K&R page 131 |  | 
	
		|  | 
	
		| cjusto 
 
 
 Joined: 26 Apr 2006
 Posts: 38
 Location: Portugal
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Jun 01, 2006 4:14 pm |   |  
				| 
 |  
				| hi treitmey! 
 what is  K&R?
 |  | 
	
		|  | 
	
		| rberek 
 
 
 Joined: 10 Jan 2005
 Posts: 207
 Location: Ottawa, Canada
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Jun 01, 2006 4:33 pm |   |  
				| 
 |  
				| Kernighan and Ritchie  "The C Programming Language" 
 This is the first C book many,many C programmers read and is a staple on most others' bookshelves.
 |  | 
	
		|  | 
	
		| treitmey 
 
 
 Joined: 23 Jan 2004
 Posts: 1094
 Location: Appleton,WI   USA
 
 
			      
 
 |  | 
	
		|  | 
	
		| cjusto 
 
 
 Joined: 26 Apr 2006
 Posts: 38
 Location: Portugal
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Jun 01, 2006 4:37 pm |   |  
				| 
 |  
				| oh. ok. thanks. 
 i didn't know it.
 
 i will check that, maybe when i finish this project.
 
 thanks anyway
 |  | 
	
		|  | 
	
		| rnielsen 
 
 
 Joined: 23 Sep 2003
 Posts: 852
 Location: Utah
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Jun 01, 2006 4:57 pm |   |  
				| 
 |  
				|  	  | Quote: |  	  | i will check that, maybe when i finish this project. | 
 
 Here we go again...
 
 *grabs both sides of the monitor, bangs head against the screen a couple of times and sits back to relax*
 
 Ahhhhhh....... much better.
 
 I taught myself to program in 'C' and this was the very first book that I bought.  This person is trying to write a program in 'C' and hasn't even thought about learning the very BASIC's of the language.
 
 *resisting the urge to grab the monitor again*
 |  | 
	
		|  | 
	
		| cjusto 
 
 
 Joined: 26 Apr 2006
 Posts: 38
 Location: Portugal
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 3:49 pm |   |  
				| 
 |  
				|  	  | Quote: |  	  | Here we go again... 
 *grabs both sides of the monitor, bangs head against the screen a couple of times and sits back to relax*
 
 Ahhhhhh....... much better.
 
 I taught myself to program in 'C' and this was the very first book that I bought. This person is trying to write a program in 'C' and hasn't even thought about learning the very BASIC's of the language.
 
 *resisting the urge to grab the monitor again*
 
 | 
 
 hey rnielsen.
 
 i can understand ur point.
 the very basics is a relative thing.
 and don't forget, each person has his own method and reallity.
 i don't know where u are from, but no doubt that we have different reallities.
 
 if i needed to program to live, i would start by that "very basics book".
 as i am developping a school project, time is runing out just from the begining.
 |  | 
	
		|  | 
	
		| rnielsen 
 
 
 Joined: 23 Sep 2003
 Posts: 852
 Location: Utah
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 4:14 pm |   |  
				| 
 |  
				| I thought school was a place where you were supposed to _learn_ things and not simply whip out projects and then say "Next project!". |  | 
	
		|  | 
	
		| dyeatman 
 
 
 Joined: 06 Sep 2003
 Posts: 1968
 Location: Norman, OK
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 5:10 pm |   |  
				| 
 |  
				| Apparently the REALITY is that they don't have time for books. I must be throwing my money away because I have hundreds (possibly thousands) of dollars worth of them in the bookcases in my office.  The method and reality employed by many young people now days is to learn just enough to get by then move on...  I just had a professed EE in one of my classes recently that got his degree like that.  He didn't have a remote chance of passing in my class because he had NO understanding of theory and what he was really doing.  Such is life... |  | 
	
		|  | 
	
		| Mark 
 
 
 Joined: 07 Sep 2003
 Posts: 2838
 Location: Atlanta, GA
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 5:54 pm |   |  
				| 
 |  
				| Keep in mind that not all electrical engineers know or even care to program!  This guy might have to take a microcontroller course to satisfy some requirements but might not care to do it for a living.  Oh, BTW, I have never read a K&R book nor really any C book except for maybe a text book in school.  We had to take a C++ class in school and that's probably the only C book that I have read (and not that thoroughly). |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 6:51 pm |   |  
				| 
 |  
				| Yes, but you're smarter than the average student and absorbed the material better.   You're not typical.
 |  | 
	
		|  | 
	
		| newguy 
 
 
 Joined: 24 Jun 2004
 Posts: 1924
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 7:08 pm |   |  
				| 
 |  
				|  	  | dyeatman wrote: |  	  | Apparently the REALITY is that they don't have time for books. I must be throwing my money away because I have hundreds (possibly thousands) of dollars worth of them in the bookcases in my office.  The method and reality employed by many young people now days is to learn just enough to get by then move on...  I just had a professed EE in one of my classes recently that got his degree like that.  He didn't have a remote chance of passing in my class because he had NO understanding of theory and what he was really doing.  Such is life... | 
 
 Had many students like this through the years.  Many.  They're what make the few good ones so memorable.
 
 What finally drove me to quit teaching was a class full of stoners.  Watching these guys was like watching a Cheech and Chong movie.  Only sad, not funny.  You think trying to teach the disinterested is tough?  Try teaching the disinterested AND stoned.
 |  | 
	
		|  | 
	
		| Charlie U 
 
 
 Joined: 09 Sep 2003
 Posts: 183
 Location: Somewhere under water in the Great Lakes
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jun 06, 2006 9:21 pm |   |  
				| 
 |  
				| It appears that there are a few of us diehards that monitor this forum regularly.  I don't post any where near as much of many of you do, but I read nearly 75% of the posts and following threads.  I too, taught myself C programming, but with the help of a couple of well educated computer science professionals.  I wanted to learn to program, and I was allowed the opportunity by clients to pursue it.  I must confess, I read the K&R C programming language book from cover to cover (with a few naps in between) before I wrote a single line of code.  I didn't absorb most of it, but I knew that I had been exposed to all of the features of C and had some idea of where to find the answers.  K&R isn't just the bible of C, these guys created C.  If I am not mistaken, they worked at AT&T labs and created the language.  Correct me if I am wrong, but wasn't UNIX written in C?  Any one who even thinks of learning C MUST have a copy of K&R.  It has all (well maybe most) of the answers to this type of question. |  | 
	
		|  | 
	
		|  |