Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 19th, 2002, 02:10 AM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Article Discussion: Pointers In C - A Boon Or A Bane?

Pointers In C - A Boon Or A Bane? If you have any questions or comments about this article then please post them here.

You can read the article here .

Reply With Quote
  #2  
Old April 23rd, 2003, 12:38 AM
simbo simbo is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 1 simbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,
I rad your article, and I'm writing a bottom-up sorting function that takes a pointer to a function, in my sorting function I try call my pointer to a function and I'm supposed to pass two arguments to it. But I'm having trouble doing that, if someone could please give me a clue on how to do this, I would be most grateful.

The code:-

void mysort(type *base,int nel,int width,int (*compar)(type *,type *))

inside the mysort function I call the compar function which is of two types that I have written :-
1. int comparestr(const void *i, const void *j)
2. int intcompare(const void *i, const void *j)

what I need to pass to compar function is type aux[i] and type aux[j] , type is my struct.

Thanks in advance.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Article Discussion: Pointers In C - A Boon Or A Bane?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT