<p>I was trying to do it as in a regular C, with void*, but it didn't work. Is it possible to pass it in NXC? If it is- how to do it?</p>

CC BY-SA 3.0
2016-05-29T16:42:49.527Z
What exactly did you try and what was the error?
Jack Wilsdon
CC BY-SA 3.0
2016-05-30T08:57:52.040Z
Like this: "int foo(void *lv, void *rv){ ... }". I took it from here: http://www.dreamincode.net/forums/topic/318113-passing-unknown-type-as-function-parameters/ ,   from jjl example.
The following errors were shown: "Unknown datatype", "Unexpected character encountered" and "Variable name expected."
elle
CC BY-SA 3.0
2016-05-31T15:35:03.597Z
You may be able to use `variant` instead of `void *` (or `variant *`), although to be honest I've not got any experience with BrixCC/NXC.
Jack Wilsdon
CC BY-SA 3.0
2016-06-01T07:55:22.903Z
Yeah, I tryed the `variant` but there was no result. Seems, that they jast don't have it in NXC. But thank you anyway.
elle
<nxc>
How to pass an unknown type as a function parameter in NXC?
elle
# How to pass an unknown type as a function parameter in NXC?

(Asked by: username_0 on 2016-05-25)

I was trying to do it as in a regular C, with void\*, but it didn't work. Is it possible to pass it in NXC? If it is- how to do it?

**Tags:** nxc

> **Comments:**
> **username_1**: What exactly did you try and what was the error?  
> **username_0**: Like this: "int foo(void *lv, void *rv){ ... }". I took it from here: http://www.dreamincode.net/forums/topic/318113-passing-unknown-type-as-function-parameters/ ,   from jjl example. The following errors were shown: "Unknown datatype", "Unexpected character encountered" and "Variable name expected."  
> **username_1**: You may be able to use `variant` instead of `void *` (or `variant *`), although to be honest I've not got any experience with BrixCC/NXC.  
> **username_0**: Yeah, I tryed the `variant` but there was no result. Seems, that they jast don't have it in NXC. But thank you anyway.  

---

## 0 answers

