Can PROS be coded in C++

  1. 5 months ago

    Can PROS be coded in C++?
    Whats the difference between C++ and C?
    can I use the C++ tutorial offered on this site (https://www.sololearn.com/ ) and be able to use PROS fine?

  2. NightsRosario

    Apr 12 Reisterstown/Catonsville, MD 3922A

    @TitanRey15 Can PROS be coded in C++?
    Whats the difference between C++ and C?
    can I use the C++ tutorial offered on this site (https://www.sololearn.com/ ) 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

  3. Edited 5 months ago by TitanRey15

    @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 (https://www.sololearn.com/ ) 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)

  4. hotel

    Apr 12 V5 Beta Moderator HTTP 404 PROS Dev Team Lead
    Edited 5 months ago by hotel

    @TitanRey15 Can PROS be coded in C++?

    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.

  5. nenik

    Apr 12 V5 Beta Tester

    @TitanRey15 Whats the difference between C++ and C..

    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).

  6. ZachDaChampion

    Apr 12 Fort Lauderdale, Florida 77788J

    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" {
    #endif

    at the top (after the include guards) and

    #ifdef __cplusplus
    }
    #endif
    
    #endif

    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.

  7. blatwell

    Apr 12 Event Partner Indianapolis 621A

    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.

  8. hotel

    Apr 12 V5 Beta Moderator HTTP 404 PROS Dev Team Lead

    @blatwell 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++ .

  9. Edited 5 months ago by TitanRey15

    @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 (https://www.sololearn.com/ ) to learn C++ or (https://www.studytonight.com/c/overview-of-c.php ) 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)

  10. nenik

    Apr 14 V5 Beta Tester

    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....

  11. Deleted 5 months ago by Aditya Diwakar
  12. dont you also have to change some settings in a make file? ive done this before but at like the beginning of the year

  13. hotel

    Apr 14 V5 Beta Moderator HTTP 404 PROS Dev Team Lead

    @TitanRey15 My team has learned python.

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

  14. Edited 5 months ago by TitanRey15

    @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: https://www.sololearn.com/Course/CPlusPlus/
    C Site: https://www.studytonight.com/c/overview-of-c.php

  15. hotel

    Apr 14 V5 Beta Moderator HTTP 404 PROS Dev Team Lead
    Edited 5 months ago by hotel

    @TitanRey15 @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: https://www.sololearn.com/Course/CPlusPlus/
    C Site: https://www.studytonight.com/c/overview-of-c.php

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

  16. @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..

  17. callen

    Apr 14 Braintree, MA, USA

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

  18. hotel

    Apr 14 V5 Beta Moderator HTTP 404 PROS Dev Team Lead

    @TitanRey15 @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..

    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).

  19. Ok, we'll start with C then.

  20. Edited 5 months ago by TitanRey15

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

  21. Newer ›
 

or Sign Up to reply!