I've developed a code using Visual Basic 6 (VB6).
To help programming, I've developed a structure.
Private Type cccs
ccc1 As Boolean
ccc2 As Boolean
ccc3 As Boolean
ccc4 As Boolean
ccc5 As Boolean End Type
Private Enum fffs
fff1 = 0
fff2 = 1 End Enum
Private fff As fffs
Private Type eees
eee1 As fffs
eee2 As fffs
eee3 As fffs
eee4 As fffs
eee5 As fffs End Type
Private eee As eees
Private Type aaas
bbb As cccs
ddd As eees End Type
Private aaa As aaas
where:
aaa.bbb.ccc1=false
aaa.ddd.eee1=fff1
Now I need some help to convert to C+/C++ to use it with Arduino.
I already have a simple structure to use with LCD button, but it's a simple structure... isn't so complex as I need now...
where:
struct Cursores{
int CursorHome;
int CursorDir;
int CursorEsq;
int CursorPiscaON;
int CursorPiscaOFF;
int CursorUnderlineON;
};
Cursores Cursor;
Cursor.CursorPiscaON
I'll appreciate your help
Thanks on advance
Best regards
What makes it simple or complex is the data types in the structure. Your current C structure contains all basic types. Your VB structures contain some simple types (boolean) and some complex types (cccs and eees).
You can do the same in C/C++. A structure can contain an instance of another structure.
Using Microsoft Visual Studio 2008? Not generally.
I agree, it's not. And that's not what the OP is saying. He is using the code he has written in VB in the past as an idea on what to do in C++ on the Arduino.
I am missing something or it's like that? I'am using Microsoft Visual Studio 2008.
If the issue was related to Arduino programming, even remotely, then it can be discussed here. I have seen nothing that says that OP's question is even remotely related to Arduino, except that the same language is being used.
Several inches of snow atop the ice. I'm stuck home because I can't ride my motorcycle to work. Yes, I'm cranky.
I wish I had that excuse (then again I'm on salary - so such a "day off" would be "paid" - from vacation hours, I guess)...
Remember when you were a kid, and a "snow day" (or in my case it was generally a "fog day" - back then, where I lived in California, the tule fog could get thick on some days, and last all day)? Why can't we play like that as adults (that's a rhetorical question - anybody who says we can't needs to learn how to be a kid again)...
PaulS:
Several inches of snow atop the ice. I'm stuck home because I can't ride my motorcycle to work. Yes, I'm cranky.
Been there, done that, got heavily into flight sims which helped the craving to feel movement and lean on turns.
BTW, look out for places where antifreeze has dried on the road. It's as bad as the grease strip but invisible. Generally in summer for the next 1/4 mile after a long light will be 'treated'. That's what got me on a downhill grade (where there's less traction) in 97.
Pedro, you might look up C/C++ typedef statement and possibly even templates. There ain't nuthin that VB does that isn't either Basic or Basic trying to act like C++ anyway.
I wish I had that excuse (then again I'm on salary - so such a "day off" would be "paid" - from vacation hours, I guess)...
Might be a little different if I didn't still have to work. But, I have a company laptop that I drag around, so they expect me to work from home when I can't get to the office. Since I'm not as productive, I feel like I should work longer hours to make up the difference, which makes the "day off" even less of a vacation that if I was commuting, despite the commute time.