I want to use void** pointer as a function arguement.
But I am not able to use it as it is giving many errors.
using single void pointer is working fine, but when i want to handle the whole 2-d array with the void pointer i am getting some errors.
here is my code..
#include <iostream>
using namespace std;
enum Type
{
INT,
FLOAT,
STRING,
UNSIGNED_INT,
};
testing.cpp: In function ‘void Print_1(void**, Type)’:
testing.cpp:17: error: expected ‘(’ before ‘pVal’
testing.cpp:17: warning: pointer of type ‘void *’ used in arithmetic
testing.cpp:17: error: ‘void*’ is not a pointer-to-object type
testing.cpp:17: error: expected ‘)’ before ‘;’ token
testing.cpp: In function ‘int main()’:
testing.cpp:43: warning: deprecated conversion from string constant to ‘char*’
testing.cpp:59: error: invalid conversion from ‘unsigned int**’ to ‘void**’
testing.cpp:59: error: initializing argument 1 of ‘void Print_1(void**, Type)’
testing.cpp: In function ‘void Print_1(void**, Type)’:
testing.cpp:17: error: expected ‘(’ before ‘pVal’
testing.cpp:17: warning: pointer of type ‘void *’ used in arithmetic
testing.cpp:17: error: ‘void*’ is not a pointer-to-object type
testing.cpp:17: error: expected ‘)’ before ‘;’ token
testing.cpp: In function ‘int main()’:
testing.cpp:43: warning: deprecated conversion from string constant to ‘char*’
testing.cpp:59: error: invalid conversion from ‘unsigned int**’ to ‘void**’
testing.cpp:59: error: initializing argument 1 of ‘void Print_1(void**, Type)’
testing.cpp: In function ‘void Print_1(void**, Type)’:
testing.cpp:17: error: invalid static_cast from type ‘void**’ to type ‘unsigned int**’
testing.cpp: In function ‘int main()’:
testing.cpp:43: warning: deprecated conversion from string constant to ‘char*’
testing.cpp:59: error: invalid conversion from ‘unsigned int**’ to ‘void**’
testing.cpp:59: error: initializing argument 1 of ‘void Print_1(void**, Type)’