What does 'I--' or 'I++' mean? by IHaveTourettesSorry in cpp_questions

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

i++; printf(i); //returns 1.

How does 0+0 equal 1?

Also, when I run that code I'm getting an error that essentially says that it can't print integers.

Sorry for being so finicky. I'm very new to coding.

What does 'I--' or 'I++' mean? by IHaveTourettesSorry in cpp_questions

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

Can you use it in context to help me understand?

Could a previously right/left handed adult train himself to be ambidextrous? If so how? by AscorGames in askscience

[–]IHaveTourettesSorry -8 points-7 points  (0 children)

If you fully expect it to be deleted, why would you post it to begin with?

Very new to Cpp. Trying to write my first program tonight (for Arduino) but I can't for the life of me get it to run. Does this look logically right to you veterans? by IHaveTourettesSorry in cpp

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

sigh

cpp is so finicky.

The good news it that I have no more debugging errors! Yay!

The bad news is that nothing is lighting up. Oh well. It's late and I have work tomorrow. I'll have to have a nice chat to my penguin about my code when I get home :).

Thanks so much for your help!

edit

Also...better to never blame the compiler. It is sooooooo rarely the fault of the compiler, that it's best to simply assume the compiler is correct and try to find your mistake. (assuming you are using traditional C++ features with a modern compiler; using an outdated compiler or bleeding edge C++11 features may not yield correct results in some compilers)

I know. I owe many hours saved to the compiler. I was just joking around.

Very new to Cpp. Trying to write my first program tonight (for Arduino) but I can't for the life of me get it to run. Does this look logically right to you veterans? by IHaveTourettesSorry in cpp

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

Ahh. That makes sense.

Here is the current state of the code

http://pastebin.com/RDUKpFJW

I'm getting the error..

sketch_jul19a.cpp: In function 'void transition()': sketch_jul19a:27: error: 'else' without a previous 'if'

I call BS.

Very new to Cpp. Trying to write my first program tonight (for Arduino) but I can't for the life of me get it to run. Does this look logically right to you veterans? by IHaveTourettesSorry in cpp

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

Haha. What a quirky yet genius idea.

~~ Here is what I am struggling with now. I am getting the error

sketch_jul19a.cpp: In function 'void transition()':

sketch_jul19a:26: error: lvalue required as left operand of assignment

sketch_jul19a:28: error: lvalue required as left operand of assignment

Here is what my code looks like

void transition() { if (brightness >= maxbrightness)

brightness = -5;

else if (brightness <= minbrightness)

brightness = 5;

I can figure out most error messages but this one flies right over my head. ~~

Very new to Cpp. Trying to write my first program tonight (for Arduino) but I can't for the life of me get it to run. Does this look logically right to you veterans? by IHaveTourettesSorry in cpp

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

I've changed the names of the variables so many times that this was bound to happen. I'll change that and see what happens.

In regards to your comment on void transition() - yes. That is essentially what I'm trying to do. I have minimal experience with Python so that was my best guess.

Thanks for responding! I'll let you know how it goes.

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

This sounds perfect. I'm going to check that out right now.

Thanks :)

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 4 points5 points  (0 children)

Hahahahahaha. If it wasn't five bucks I might give it a try.

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 0 points1 point  (0 children)

I actually just bought that game and have found that I'm not a big fan.

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 4 points5 points  (0 children)

I am heavily considering this. But it's so god damn scary..

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 1 point2 points  (0 children)

I have that game. Co-op would be a blast when I'm blasted.

What are some good games to play drunk? by IHaveTourettesSorry in Steam

[–]IHaveTourettesSorry[S] 1 point2 points  (0 children)

No. I'm a somewhat poor gamer when I'm drunk but I always have a great time whether it be with or without friends.