Multiple files for vex code iq

Me and my team want to use multiple files to organize our code for our robot well. We’ve been using python until now, but we’re ready to change if it might help. In not sure how to do this, so any help would be appreciated !

I dont think that this is possible in IQ. You can have different scripts altogether but they cannot reference each other so that doesnt really solve your problem. Are you sure there is no way to organise it better within one file? Have you tried using functional programming which may help with organisation?

Can you say some more about what you want to do? I read your note as being able to have multiple source code files, say one per function. In this case you would use the simple version of the import statement.

A more complicated version is to create modules and then import the modules as needed. In both cases Google can help

@Fractal_23218X is talking more about having multiple functions that do an action and then passing that action into a function. The ability for Python to do Call by Value and Call by reference is pretty cool.

Id like to use c++ classes, so i can organize everything with inheritance. I feel like if at one point if I want to collaborate with teammates in GitHub, it would be easier to work with

If you are using IQ Generation 2 then switch over to using VSCode with the VEX extension, C++ projects can use multiple source files.

I’ve tried doing it, but the code wouldn’t compile for some reason

If it’s a simple project then zip it up (the project folder will all files) and post here, I can take a look for you.

The problem is that it doesn’t identify my #include statements, and it gives me an error, it did you the same with python for the brain class

Python projects don’t support multiple source files (possible using SD card but that I don’t think is what you want to use).

Are you saying an intellisense issue (you need microsoft C++ extension) or that it doesn’t build. Without seeing the project it’s almost impossible to provide help.

I got it solved, I was running it as a normal c++ file rather than using vex build command.

How do I add devices to my vex project in vs code ?

I can use multiple files in vscode, but, I can only use vexcode IQ for actually testing, so if I just test main.cpp will it work right ?