Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 10th, 2005, 6:08 AM   #11
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4 Klarre is on a distinguished road
I read your "Pointer basics" section and played around with pointers, references and arrays, and checked how they were stored in the memory. For about five minutes, I finished the implementation of my lookAt function, and it works great!
Thanks alot for your help!

/Klarre
Klarre is offline   Reply With Quote
Old Nov 16th, 2005, 4:53 AM   #12
SittingDuck
Programmer
 
SittingDuck's Avatar
 
Join Date: Nov 2005
Location: Moseley, Birmingham, England, Earth
Posts: 51
Rep Power: 3 SittingDuck is on a distinguished road
In C it would be:

void fn(float* array, int length){
	int i;
	for(i=0;i<length;i++){
		// do something with the array
	}
}

void caller(void){
	float myarray[4]
	myarray[0] = 0.2;
	// etc
	fn(&myarray, 4);
}

It's not difficult in assembly.
SittingDuck is offline   Reply With Quote
Old Nov 16th, 2005, 6:53 AM   #13
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by Klarre
I read your "Pointer basics" section and played around with pointers, references and arrays, and checked how they were stored in the memory. For about five minutes, I finished the implementation of my lookAt function, and it works great!
Thanks alot for your help!

/Klarre
Good job , someone is learning something. Thank goodness.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:06 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC