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
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)
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)
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)
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 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)
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 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)
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 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)
Discussion started by: SIMMS7400
2 Replies
LEARN ABOUT DEBIAN
event::generic
Event::generic(3pm) User Contributed Perl Documentation Event::generic(3pm)NAME
Event::generic - generic event handling
SYNOPSIS
use Event::generic;
$source = Event::generic::Source->new;
$w = Event->generic(source => $source, ...);
$w = $source->watch(...);
$source = $w->source;
$w->source($source);
$source->event;
$source->event($data);
$data = $event->data;
DESCRIPTION
This module provides a watcher type within the "Event" framework. You must understand the architecture of the "Event" system in order to
understand this document.
This module provides a system of reified event sources and watchers watching those sources. Events are generated solely by a method on the
event source object. The events may carry arbitrary data to the event handler callbacks. This module is intended for situations where the
events of interest are best determined by Perl code.
CLASSES
Event::generic::Source
A reified event source.
Event::generic
A watcher that can watch "Event::generic::Source" event sources.
Event::Event::Dataful
A (target) event that can carry arbitrary data.
EVENT SOURCE CLASS
Constructor
Event::generic::Source->new
Creates and returns a new event source.
Methods
$source->event
$source->event(DATA)
The invocation of this method is a source event for watchers of the event source. When this method is called, each active watcher of
the event source generates a target event. The DATA, if supplied, is copied into the target event objects, from which it can be
retrieved using the "data()" method.
$source->watch(ATTR => VALUE, ...)
Generates and returns a new watcher, configured to watch this event source. The standard watcher attributes may be specified as
arguments. The watcher returned is an ordinary "Event::generic", and may be reconfigured to watch a different event source.
WATCHER CLASS
Type-specific attributes
source => $source
The event source to watch. This must be either an "Event::generic::Source" object or "undef". When set to "undef", no source is being
watched, and the watcher cannot be started.
EVENT CLASS
Type-specific methods
$event->data
Returns the data associated with the event, which may be any scalar. This is read-only, and is set by the event source.
SEE ALSO
Event
perl v5.14.2 2007-05-22 Event::generic(3pm)