Using C++ vs LabVIEW?

So I’m at a crossroads. This year I’m the one programmer on my team, and our one programmer last year did not tell me ANYTHING about what to do for this. So I’ve never used LabVIEW before a couple days ago.

I know basic C++ and taught myself up to pointers (still don’t understand those cursed things though). What I want to know is, would I be better off using LabVIEW since I don’t know enough C++ for FRC use, or does the C++ used for this stay MOSTLY by the basics and I could just learn the rest? Is it easier to learn LabVIEW from NO prior knowledge at all, or C++ from SOME prior knowledge?

If you understand pointers, you can probably program an FRC robot with little trouble. WPI has really made things simple :slight_smile:

no no no. I DON’T understand pointers. I kinda half somewhat to a minor extent understand what I’m supposed to understand… But I don’t know them well enough to say Yes, I know them. But I got everything UP TO that point easy peasy

Start moving forward with LabVIEW in that case. Don’t be discouraged from looking at C++ though. As a programmer, you have a lot of extra time to work and test new things.

I know that our team has used Labview for the past four years, and now I want to try to branch of onto C++ (for various reasons) our main focus is labview since that is what I have drilled in their heads for so long. Yet I am learning C++ to have a bit of a “failsafe” if something were to happen with labview for any reason (something being we need programming help at competition, and NOONE uses labview)

The chances that nobody uses or knows LabVIEW at a competition are relatively slim. But learning more than one language is certainly a good idea.

My input would be to look over some of the LabVIEW examples and tutorials. Do the same of C++. Perhaps even write a bit of sample code that you think you’ll do on your robot using joysticks or encoders or gyros in each.

Make an informed choice. There is no perfect language. There are tradeoffs with each, and learning how to learn languages and language features is one of the key aspects that will make you successful in computer science.

Sorry, going off topic on this thread but…
Every year we have gone to the Chesapeake regional, we are the only team that used labview… not joking. If someone else did, then we must have missed them when asking for help.

We were at Chesapeake last year and we used LabVIEW and I know of other teams I worked with there.
We’ll see you at the Virginia Regional this year if you need help there.

Err… A pretty heavy majority of teams use labview actually, and NI support at the event has always been great.

and if you’re new to programming and want to use a text-based language, I’d recommend Java as a first choice. It is much easier to program and much more forgiving with respect to pointers and memory. The performance for robot programming is pretty much equivalent unless you are doing computationally expensive operations.

Good luck with whatever you choose!


so… getting back on topic, do you use pointers a lot when coding the robot in C++?

Yes, but not in any theoretical sense. As long as you know how to deference (*) and how to use methods on pointers (->) you’ll be fine.

Do teams use lots of pointers in FRC code? Lists, trees, and other data structures held together with pointers are not common. Object instances held in a static global or passed around as parameters are common, but those can be references if you would like. I think the answer is, you will use pointers some, but you do not need to use them in complicated ways to be successful in FRC.

Greg McKaskle

For our code last year, we NEVER used pointers! We are using them a bit this year. I must say, coding in C++ with WPILib is the easiest thing I have ever done! Since few teams actually use C++, you can become an asset to other teams using C++. I find that C++ (or Java) is actually EASIER that LabVIEW!:ahh: But play around with all three (or two) and pick the one you do best in! :smiley:

Go with C++, you know enough to learn what you need for FRC in a few days or a week, tops.

I never understood pointers before making our code last year.
In fact, I didn’t even know what classes were.
Yet, I made good functional code. Pointers are fairly easy to learn by actually using them, and once you do, they make a ton of sense (A pointer is just a data value or variable storing the adress of a variable. When working with classes, just substitute a -> for a . and you’re good to go).
Id say go with what you know. Its very simple and robust, much better than LabView (From my experience with NXT-G, I despise LabView).
As some have said here, you dont really need to use pointers in your robot unless you like them, or want to do multithreading.

Feel free to check out and study source code that we have in our repository at .