Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

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

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);


Last edited by kapsikum; 03-09-2005 at 09:20 AM.
Old 03-09-2005, 09:39 AM   #2
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, 10:07 AM   #3
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
OK thanx, itsme86


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:19 AM
datatype conversion in postgresql 7.4.1 supersucker Programming 1 05-23-2005 05:11 PM
void main(void) linuxanswer Programming 4 10-26-2003 01:37 AM
void foo(void) and void foo() lackluster Programming 9 02-15-2003 11:57 AM
ide_dma_timeout func only: 14 MesS Linux - Software 5 10-09-2001 06:37 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:42 AM.

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