Need help with this c++ source code! Dont understand what some of the syntax means.
Okay so I am just starting programming c++. I just started started to red "C++ for Dummies yesterday and theres a lot of things I do not understand from this book and this source code especially. I will first post the full source code and then post questions about certain thing, usually what they do and how they help. Anyways here it is! (I understand there are comments yet I still don't understand some stuff , sorry)
Okay so these are the things I do not undersand. In these lines, i understand it declares a variable and names it "factor" but I dont understand why on the next line it says "factor = 212 - 32;" what does the equals sign mean and what do the integers 212 and 32 do? also what the minus sign do. I think this is an expression but i dont understand it. Do I need it? Please help! Explain it in non geeky please guys! I am pretty newbie. Here is the source code:
Next would be this expression and how it works. Is this the formula to convert Celsius to Fahrenheit? Please explain everything and what ALL things do. equals sign, etc. Non geeky please I am pretty newbie right now.
Well that's it for now! I hope you wizards answer this soon. I will continue to read and continue to stumble countless times. Anyways guys have a good day!
Last edited by orszhak; 04-09-2011 at 03:53 PM..
Reason: mistakes made
Is this homework??? I'd understand if you have questions about the syntax, but about basic mathematical expressions???
I wouldn't even know how to explain this "geeky" (as you put it). Those are mathematical expressions / formulas. The minus sign is an operator, just as in mathematics, and does the same thing as it does there: substract 2 numbers.
I'am currently reading c++ for Dummies and it gave me this source code for the calculator. Anyways I wanted to know what this meant:
Why are their the integers 212 and 32? What is an operator, more what does it do?
Next would be this one I believe it is the expression to calculate the conversion?
Does the 32 here connect with the 32 on the other line? What about the "100"?
Anyways my real question is on the first one. Anyways hope you guys can help!
---------- Post updated at 01:00 PM ---------- Previous update was at 12:58 PM ----------
Hi Folks -
I'm getting the following error message when executing my script:
$ chmod +x Winexe_Admin.sh
$ ./Winexe_Admin.sh
Script Name: Winexe_Admin.sh
Script Name without EXT: Winexe_Admin
./Winexe_Admin.sh: line 43: ${_MAINPATH}${_LOGPATH}${LOGPATH$}${_YEAR}_${_MONTH}${_DAY}: bad... (2 Replies)
Working on some source I've found some strange declaration in included header file.
I am looking for someone's help to understand me that syntax's, as it is fine (it is compiled without any complain,) but for me it seems out of any sense!
Acctually, it warning by CC compiler: " Warning: Implicit... (1 Reply)
Hi guys can you please help me to understand this code .
tmpArray=(${line//=/ })
Please next time open a new thread in the appropriate forum and use code tags (6 Replies)
Hey so I've written a program and it crashes every time I run it. I tried placing breakpoints to see what was going but to my surprise they do not work! I've placed them anywhere and they do not stop the execution of the program.
In fact if I add code and hit rebuild it doesn't even build that... (1 Reply)
Hi All,
Good day, i'm just wondering what is the meaning of this code?
COUNT_EXTRACTED_FILE=`${ECHO_CMD} "${SE_IN_PATH}${SE_IN_FILE}" | ${AWK_CMD} -F"__" '{print $2}'`
Thanks,
-niks(newbie) (2 Replies)
Hi Guys,
Can someone please explain this code to me. I could figure out it's adding and comparing two fields but I am not sure which ones.
sort -t"|" -k3.1 /tmp/mpcashqc.xtr| awk -F"|" '{CHECKAMT+=$3;BATCHTOT=$4;\
items++}END{for(i in CHECKAMT) if (CHECKAMT!=BATCHTOT)... (6 Replies)
Hi, experts.
Whould anybody clear explay me difference and usage of these 3 commands (particulary in bash) :
exec
eval
source
I've tryed to read the manual pages but did not get much.
Also could not get something useful from Google search - just so much and so not exactly, that is... (3 Replies)
Hey,
Could you explain me what this code is doing ?
For example:
$i has value 9
$1 is the name of the file say FILEBkUp
while
do
if $1.`/bin/expr $i - 1` ]
then
mv -f $1.`/bin/expr $i - 1` $1.$i
fi
i=`/bin/expr $i - 1`
done
Thanks... (2 Replies)
i'm trying to learn unix and i posted a question and what i was typing from school. i can't figure it out. how am i supposed to learn , when i get shutdown by an admin. for posting a homework question. doesn't make any sense. its a dumb rule. thanks for helping (4 Replies)