| | |
void** syntax question
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Aug 2007
Posts: 4
Reputation:
Solved Threads: 1
I have a function that takes a void** and I want to pass an integer in to the function but can not seem to figure out the syntax
here is the function prototype
here is the function prototype
C++ Syntax (Toggle Plain Text)
bool pop(Node **stack, void **data)
I think you have to do something like this because int** isn't a compatible type with void**.
C++ Syntax (Toggle Plain Text)
int i = 123; int *p = &i; void pop( void **data ) { *data = p; } int main() { int *q; void *pv; pop( &pv ); q = static_cast<int*>( pv ); return 0; }
The truth does not change according to our ability to stomach it.
![]() |
Similar Threads
- XML Syntax Question (XML, XSLT and XPATH)
- [Question] The if statment (C++)
- unfamiliar syntax (Java)
- what doesnt work? plz help guys (C++)
- Help with constructors and deonstructors (C++)
- need HELP .jpf/weblogic/jsp - with CODE (JSP)
- Old School Compiler vs New Compiler (C++)
- reading a file into code (Java)
- Data Abstraction (Computer Science)
Other Threads in the C++ Forum
- Previous Thread: sum of specific integers
- Next Thread: error LNK2001: unresolved external symbol
| Thread Tools | Search this Thread |
api array based beginner bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project python random read recursion recursive return sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





