C++ Task: http://screencast.com/t/4EDESKcj Code for the Task:http://pastebin.com/jrFCimga Error I am getting: http://screencast.com/t/ndEPszkq Why am I getting this Error?? I don't understand??
@dumbsearch2 Get over here now...i know you can do this...
Help me someone please, I know there is a detail I am missing and its driving me crazy...
@dumbsearch2 Is like a wizard...he is just slow as heck
What do you mean @dumbsearch2 ? Like what looping macro ???
Your using the variables without giving them their "default" value. This warning will go away if you do this: int k = 0; for each variable. k being the variable name.
Tell me if that works, or helps.
Though please note that I have only started picking up C++ in the past week, PHP, Java and the web languages are what I'm best at.
Bro now its letting me run the program but It doesn't work, for example what ever variable I enter to the program, it doesn't display anything
@dumbsearch2
What errors do you see left ? or warnings
There are no further syntax errors left, the program just doesn't work correctly. @dumbsearch2
@opcode He's an expert at C++! But huh! This is so weird...
Please help me guys :(
Dude what is this?
It's so easy to sign up. It's the biggest programming forum. You get the answers in 1-5 minutes. StackOverflow
You have a few problems with that code. I'm surprised that you got a compile out of it. Blocks of code, a block being more than one line, need to be started and ended with curly brackets ( "{}" ). It will also help the readability of your code, and it needs it. Your if() statements are logically wrong. They're comparing a variable a against an uninitialized variable. You probably want to compare to a literal value: if (a == 'd' || a == 'D' ) { // do something } There may be a problem in your if() statements that comes down to operator precedence. In complex condtionals like above, I was taught to write them: if( (a == 'd' ) || ( a == 'D' ) ) { } which would || the results of the two ==. Without the parentheses, I'm not sure that || would evaluate after ==.
Join our real-time social learning platform and learn together with your friends!