Can PROS be coded in C++

Can PROS be coded in C++?
Whats the difference between C++ and C?
can I use the C++ tutorial offered on this site ( and be able to use PROS fine?

I’m assuming you meant to ask something along the lines of “Can PROS compile C++ code?” to which the answer is yes. Iirc, you can just save the files as .cpp, but I may be wrong. @hotel and @edjubuh would probably know more

@NightsRosario Thank you for your speedy response! However, I still have a couple of unanswered questions (Perhaps the reason they were unanswered was because you didn’t know… so i guess this questions goes out to EVERYONE then…)
Whats the difference between C++ and C… And will the tutorials offered on this site ( be sufficient to work in PROS (as in will i get problems in PROS if i use terminology i learned in C++)? If you click C++ on the site i sent, it will give a very general overview and you can tell me if there are some stuff i may need to learn outside of solo learn so that i can code properly in pros (other than pros api and stuff)

We do not officially support C++ for PROS on the Cortex, although some users have been able to get basic C++ language features to work.

C++ is pretty much an extension, superset of C. It brings extra language features that you may or may not use. So a C source is also a valid C++ source (most of the time, both languages went through significant evolution and have different versions of their respective language standards).

Getting C++ to work is pretty easy, just save everything as .cpp files instead of .c, and make sure thal ALL .h files have

#ifdef __cplusplus
extern "C" {

at the top (after the include guards) and

#ifdef __cplusplus


at the end. This isn’t officially supported, but it works well (and I’ve had less problems with C++ PROS than C). C++ is basically upgraded C, with classes, booleans, etc.

In addition to what @hotel said, though C++ is not officially supported on the cortex, I believe it will be for the V5. I am sure @hotel will correct me if that is not right.

This is correct. PROS 3 (for the v5 platform) will support both C and C++ .

@hotel @blatwell @ZachDaChampion @nenik My team has learned python. Should we learn C or C++ then (seeing that both work fine and are/will be supported)… We would use ( to learn C++ or ( to learn C… what would be best for my team as we need to understand the language asap… which site would you recommend (based on my two links… each site shows a “syllabus/table of contents”… for the C site it shows on left hand side… while on the C++ site if you click C++ it shows a general overview of topics to be learned)

To be honest, for robot programming, you’d typically need very little knowledge of the language. I mean, yeah, absolutely, go learn the language, it will pay off in the longer term.
But if you need to code something for a robot ASAP, you’d better follow samples.

Programming VRC robots, you rarely need to understand all the language features. On the other hand, typical curriculum focused on the language as such won’t teach you the approaches best suited for this task of robotics. You’d need to get quite advanced with VRC before you will really benefit from understanding pointer math, data structures and algorithms…

dont you also have to change some settings in a make file? ive done this before but at like the beginning of the year

Have you heard of Robot Mesh Studio? You would be able to program your robots in Python directly if you wanted to

@hotel @nenik Ok, thats great so we don’t need to go too deep with the maths, etc. But we will need to know the generals like functions, return types, parameters… Now we intend not to do Robot Mesh anymore… We plan to use PROS… We want to choose between C++ and C… and I just want to make a decision… so I need an answer here and the reason why you’d support that language… Perhaps not just looking at the language, but the services we’d use to learn them should help you factor in what my choice should be…
C++ Site:
C Site:

well, if you’re using PROS 2, you should use C. fewer headaches that way.

@hotel And PROS 3 is coming out in May? And I’m guessing that allows C++… Ok… How about the new Vex V5 Editor vex talks about…

My understanding is that VCS supports C++ and PROS and that PROS 3 will support C++.

Yes, when PROS 3 is released you will be able to use C++ out of the box (I think I mentioned this a little earlier in the thread). I still recommend starting with C for now though. There are certain concepts that can be taught using C that will make the jump to C++ a little easier (namely memory management-- this is all manual in C, but you build up a basic understanding of how a program works this way and consequently, writing C++ with its “automatic” memory management becomes a little easier).

Ok, we’ll start with C then.

@callen Any idea when the Vex Coding Studio will be released? Will Vex Coding Studio allow both C and C++?

You don’t have to change the makefile for C++. You do need to make some minor modifications to have subfolders in /src, maybe that’s what you recall? It may have also been different in the past, I only started working with C++ in PROS a few months ago.