Scheduling CPu algorithms

Reply

Join Date: Oct 2009
Posts: 4
Reputation: 50701735 is an unknown quantity at this point 
Solved Threads: 0
50701735 50701735 is offline Offline
Newbie Poster

Scheduling CPu algorithms

 
0
  #1
Oct 20th, 2009
please tell me about some my questions.
if (we have a pointer *tmp)-> that my goal is assign that pointer for another pointer ** temp ;
so ,how do we assign for right sytax.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 358
Reputation: dkalita will become famous soon enough dkalita will become famous soon enough 
Solved Threads: 56
dkalita's Avatar
dkalita dkalita is offline Offline
Posting Whiz
 
0
  #2
Oct 20th, 2009
Originally Posted by 50701735 View Post
please tell me about some my questions.
if (we have a pointer *tmp)-> that my goal is assign that pointer for another pointer ** temp ;
so ,how do we assign for right sytax.
are u asking something like
  1.  
  2. int y;
  3. int *p;
  4. int **pp;
  5. p = &y;
  6. pp = &p;
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 4
Reputation: 50701735 is an unknown quantity at this point 
Solved Threads: 0
50701735 50701735 is offline Offline
Newbie Poster

function pointer

 
0
  #3
Oct 20th, 2009
Originally Posted by dkalita View Post
are u asking something like
  1.  
  2. int y;
  3. int *p;
  4. int **pp;
  5. p = &y;
  6. pp = &p;
thanks for your answer.
so if i have a function and a pointer . i want to point that pointer to that function,how must i do?
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 358
Reputation: dkalita will become famous soon enough dkalita will become famous soon enough 
Solved Threads: 56
dkalita's Avatar
dkalita dkalita is offline Offline
Posting Whiz
 
0
  #4
Oct 20th, 2009
Originally Posted by 50701735 View Post
thanks for your answer.
so if i have a function and a pointer . i want to point that pointer to that function,how must i do?
read about pointer to function
http://publications.gbdirect.co.uk/c..._pointers.html

a small example:
  1. int myfun(int par)
  2. {
  3. return par+1;
  4. }
  5. int main()
  6. {
  7. int (*fptr)(int); //pointer to function
  8. fptr = myfun; //assigning the function to the pointer
  9. (*fptr)(3); //calling the function using pointer
  10. // OR
  11. fptr(3);
  12. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 282 | Replies: 3
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC