LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-09-2005, 07:45 AM   #1
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Rep: Reputation: 16
how to find datatype of formal parameter in func(void *i,...)


hi,
can any body plz tell me how to determine , with what data type the
argument 1 i.e . 'argument' was called in function foo()
the declaration goes here:

void * foo(void *argument, size_t i);


kapsikim

Last edited by kapsikum; 03-09-2005 at 08:20 AM.
 
Old 03-09-2005, 08:39 AM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
You can't. You'll need to do something like pass another type parameter to the function and then do an if/else or switch on that type parameter.
 
Old 03-09-2005, 09:07 AM   #3
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
OK thanx, itsme86
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between function declaration: func() and func(void) koyi Programming 4 11-19-2005 10:19 AM
datatype conversion in postgresql 7.4.1 supersucker Programming 1 05-23-2005 04:11 PM
void main(void) linuxanswer Programming 4 10-26-2003 12:37 AM
void foo(void) and void foo() lackluster Programming 9 02-15-2003 10:57 AM
ide_dma_timeout func only: 14 MesS Linux - Software 5 10-09-2001 05:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration