Tuesday, July 14, 2009

In linux which function will do the work of flushall() function in C?

flushall() function is ued to clear the buffer in ansi C.


in linux flushall() is showing error.(undefined reference )

In linux which function will do the work of flushall() function in C?
flushall is not ANSI C.





For linux, maybe fpurge and __fpurge are what you are looking for?
Reply:Good places to post LINUX questions:
Reply:C is a programming language


Linux is a operating system





you won't have the same function.... :s





there's no output buffer to flush in a operating system.

sundew

How can I optimize a C++.NET DLL?

I've just finished creating a .NET Class Library DLL of a C++ Application I've been working on.





It mainly deals with graphics processing routines and the purpose of the DLL is so that I can use it with my primary application which is written in C#.





I've successfully added the DLL as a reference and I can call the functions but some of the routines that take 1 second to complete when run in standard C++ take nearly 50 seconds to complete when called from C# across the DLL.





I wrote a quick function to return a Bitmap loaded from file across the DLL and C# was able to get *this* done in a second, so I'm assuming it's my Bitmap filter routines that need optimizing.





Does anyone have some helpful tips on how I can re-do the DLL without major routines re-writes or optimize it so that the processing times are about the same as they conventionally are?





Thanks!

How can I optimize a C++.NET DLL?
So that i understand this correctly, you wrote a DLL in C++ and are referencing it from C#...Makes sense....And you mention that that DLL, when it takes action, normally thakes 1 second to process a loaded bitmap (using your filter routine) but when you call that same C++ function(s) from your C# app then the result takes 50+ secs?





And you've narrowed it down to not be the problem of the Bitmap loading (either from C++ or C#) but potentially the Bitmap filtering routines held in the C++ DLL when being requested from C#?





Not sure if you would want to do this but have you tried inlining the C++ unmanaged code routines within your C# app and see if that helps (C# can execute C++ code too -- in unmanaged mode, of course).





It is a bit strange to me why your routines take 50+ seconds when being requested from C# because i've done some very intense graphical stuff in the same manner (C# to C++ dll) and have not experienced this before. Granted the DLL and its dependent libraries are not loaded at runtime until required by the C# code and so when you make your requests it is technically then starting to put your code into memory and process it (and its supporting libraries) -- this is possibly the slow down...You could have it loaded immediately into your process space when your c# code launches


I am looking for a rare book entitled something like, 100,000 Years B. C. Giordano Bruno may be referenced.?

It would be a book on Philosophy or Spirituality.

I am looking for a rare book entitled something like, 100,000 Years B. C. Giordano Bruno may be referenced.?
Have you tried on Ebay or Amazon.com ?
Reply:Check bigjar.com in Phila Pa. Phila is full of used and rare book stores.


V=u+at which means ds/dt=u+at. Then integrate both sides and s=ut+0.5at^2+c where c is a constant but why is c

v=u+at which means ds/dt=u+at. Then integrate both sides and s=ut+0.5at^2+c where c is a constant but why is c always left out when we have a reference point?





Side question also related to projectile motion:


How does air resistance affect the range of the motion?


How does the angle change ,compared to the angle without air resistance to reach a point, when there is air resistance to reach the similiar point?

V=u+at which means ds/dt=u+at. Then integrate both sides and s=ut+0.5at^2+c where c is a constant but why is c
There are infinitely many curves that satisfy the differential equation s' = u + at. We need information, to uniquely identify the required curve.


Given a reference point is an initial condition.





Your side question i am not sure of because its been a long time since i did physics,
Reply:The constant c is left out because the reference point constraint defines the constant. Note that if you did not define u, you would have TWO constant terms for the displacement eqtn, c1*t and c2.





Air resistance slows the projectile, and the total range will be lower than in a vacuum.





The shape of the path of the projectile in a vacuum is a parabola. So if it is projected upwards at an angle theta and the target is at the same level, the projectile will hit at the angle theta.


For a projectile in air, the angle at which the projectile hits the target is greater than theta.
Reply:s=ut+0.5at^2+c





This is a general solution.





You have to find the value of C from the initial condition.





That is valid for any integration.





Now when t = 0 we know S = 0.If you wish you can take it to be some value C.





If we take S = 0 when t = 0, then putting these values in the equation





s=ut+0.5at^2+c , we get C = 0.





Thus in all equations we assume that at the start the distance is zero.





If it starts from some distance c in the beginning, then the equation is





s=ut+0.5at^2+c or





[s-c] = ut+0.5at^2.


--------------------------------------...





In projectile motion, if there is resistance due to air, then both the horizontal and vertical motion are affected by the resistance.





If ma is the force of friction, then a is the acceleration opposing the motion.





Then the verrticl motion we use [g-a] instead of g alone.


The vertical acceleration decreases.





and in horizontal motion the equations to be used are





v = u –at . s = ut -1/2at^2 , v^2 –u^2 = -2as etc and solve accordingly





t=The angle is always determined by the ratio of the horizontal and vertical velocities at that instant
Reply:Because c represents the initial position(initial value of s) and at a reference point you´´ll take it normally =0


The influence of air resistance is very complicated and the differential equation is completely different
Reply:♥ sorry I’m late with my answer; let me also put in a few words.


♠ constant c in


s=ut+0.5at^2+c solution


of differential eqn s’=u+at


is always taken into account!


Its value depends on initial condition attached to differential equation.


☺If initial condition says “at t=0 s(0)=0” then


s(0)=u*0+0.5a*0^2+c, hence c=0; thus your final solution looks


s(t)=ut+0.5at^2+0, that is s(t)=ut+0.5at^2;


☻Suppose initial condition says “at t=0 s(0)=7.7”; Then


s(0)=u*0+0.5a*0^2+c, or 7.7=u*0+0.5a*0^2+c,


hence c=7.7; thus your final solution looks


s(t)=ut+0.5at^2+7.7; c is present!


♦♦ your Side Question is a real headache in artillery schools coz drag force of air and wind has a great effect on hitting a target successfully;


E.g.: differential equation with constant drag force in still air looks:


y’’ +ky’ +g=0, x’’+kx’=0, where x=x(t) and y=y(t) are describing trajectory coordinates of projectile with initial conditions x’(0)=u, x(0)=0, y’(0)=v, y(0)=0, while k should be found experimentally;


♥ the solution of this eqn looks:


x=u*f(t), y=(v +9.8/k)f(t) –9.8t/k, where f(t)=(1-exp(-kt))/k;


now if k → 0 (drag force is negligible - vacuum!),


then x=u*t and y=vt -0.5gt^2 represent recognizable parabolic trajectory!


♥ conclusion: 1)the trajectory in air is lower than that in vacuum; 2)the projectile will hit the ground sooner than in vacuum;


since tan(θ) =u/v, and muzzle speed w=√(u^2 +v^2) is constant for the given cannon, then 3) launch angle θ must be greater in air than that in vacuum.
Reply:Usually c is left out because it is always assumed that s = 0 for t = 0.





For general conditions the C constant cannot be forgotten. Its definite value will depend on the initial conditions.





Side question: Air resistance. The air friction force obeys to the following approximate law:





f = k* v^2 (1 + alpha*v^4)





(assuming the body is not too small, u is not too small and u not of the order of the sound speed).





For a free fall you can integrate the equations (hyperbolic funtions, you can find also that there is a limit speed), but for a general balistic motion the only way to find the trajectory is by computer simulation. It is very easy, Quick Basic or Borland Pascal are enough, not forgetting to use double precision arithmetic.





Then you can find that the angle to reach the maximun distance is less than 45 degrees. For u = 200 m/sec and K=0.001 (alpha= 0) the angle found is 36.7 º and the max high = 128.6 m, with the projectile falling at a distance = 1274 m. Time on air is 16.5 secs. Without air resistance the figures are: 3911 m distance, max high 347 m, time on air 24 secs.





I apologize for my poor English.





Note: Were you interested on the subjetc, I could send you the source BASIC code. Comments are in Spanish, but the instructions can be easily understood.





Hello again! at home now. From the link





http://pedroweb.dyndns.org/ashow





you can download the projectile motion simulation code (QuickBasic45) and the executable module (DOS environment). I translated the prompts into English. Resulting figures are written in an ouptut file so you can plot the trajectory with Excel or any other tool.
Reply:yes you are right.but i willrewrite the whole enunciation and solution:


suppose a particle starts(at t=0) ftrm positon s(0)and initial velocity u


and moves with uniform acceleration (constant) a along a straight line. Find the expressions for the velocity v or v(t)%26amp;position sor s(t) at time t


Solution


dv/dt=a


integrate with respect to t


v=at+B


to find the constant B, we use the initial condition v=u at t-0


u=0+B


substitute B=u above, we get expression for v(t)OR v


v=u+at


OR ds/dt=u+at


integrate with respect to t again;


s=ut+1/2at^2 +C


to find the constant C, we again use the initial condition: when t=0, s=s(0).


s(0)=C


Putting C=s(0), we get the expression for s(t) abbreviated to s


s=ut+1/2at^2+s(0).


so yor c=s(0) given by the initial condition.


sometimes we take the starting point as origin, then s(0)=0


and then the equation reduces to s=ut +1/2at^2


C++ question?

Please tell me in C++ how does return *this; relates to returning a reference in assignment operator overloading





I am confused because this is a pointer to the current object and the return value of the function is ClassName %26amp; which is a reference. so how can ClassName%26amp; be the return type when we are returning using return *this; statement.





sample code:





MyClass%26amp; MyClass::operator=(const MyClass %26amp;rhs) {


... // Do the assignment operation!





return *this; // Return a reference to myself.


}

C++ question?
well a reference is like a pointer whose address you can't set so *this returns a MyClass Object and c++ can automatically make a MyClass reference from an objec.t

baby breath

If I'm writing a VB.NET command line app, how do I reference the command line parameters?

for example, if I type:





C:%26gt; myapp.exe -s -t





how do I reference the command line parameters ("-s" and "-t") so I can use them in my application?

If I'm writing a VB.NET command line app, how do I reference the command line parameters?
Re-declare Main like this:





static void Main(string[] args)





(that's C# syntax btw)


Pointer to reference conversion?

in c++ how do I convert a pointer to a reference without using rtti depedency, I know its dangerous but the conversion is only made after a null pointer check has been made

yucca

Reference books?

Which author's book(Reference book) is the best for 10 th C.B.S.E board exam for all subjects?

Reference books?
HI there :) whosever you are, let me tell you that the 10th boards are going on and are about to be finished!!!!





But if you'll be doing 10th in 2008-09, then i think there are different BEST books for each subject.





Maths- R.D. Sharma, Together with


Science- V.K, together with





(together with is fine. i'd rate it 3.5/5 but i think our NCERT texts are the best!)





S.st- together with


Hindi- together with


English- BBC.





Anyways best of luck to you. :))


CATHOLICS: Please provide a Biblical reference for the catholic practice of blessing pets.?

Thanks!





Saying that "one of the saints did it b/c he loved animals" is not a biblical reference.

CATHOLICS: Please provide a Biblical reference for the catholic practice of blessing pets.?
Deu 28:4 Blessed shall be the fruit of thy body, and the fruit of thy ground, and the fruit of thy beasts, the increase of thy cattle, and the young of thy flock.





Deu 7:14 Thou shalt be blessed above all peoples: there shall not be male or female barren among you, or among your cattle.





These are but a few of the blessings of obedience to the Law. I dunno. Nothing is impossible with God...I sort of grimaced when I heard about the blessing of dogs.
Reply:It's logical folly to condemn things not listed in the bible. You drive a car and use a computer don't you? See those listed in the Bible anywhere?





EDIT: All right, we'll change the way we look at this then. Tell me in the Bible where it says you shouldn't bless your pets. See the problem now? Same deal with infant baptism. Not mentioned at all. So if the Bible's silent on it you shouldn't assume it's good OR bad.
Reply:*Is Catholic*





Sure not a problem.





First though let me chide you. In Catholicism, scripture is not the bedrock fundamental to what we believe. We are not a "people of the book", but rather a people of Christ. Scripture exists for Catholics not as an instruction manual but rather as something that testifies to the Faith, which predates the writing of scripture, being true.





Here is your scripture verses.





First please memorize John 21:25.





Now let me show you how scripture testifies to the Catholic practice of blessing pets.





Read


Zechariah 14:20-ff


Romans 8:18-22





Now the day of the LORD is present now in time. The eschaton has broken into the middle of time, and that which we await, Christ, is now present. What does it mean that things in Zechariah have inscribed upon them "Holy to the Lord"? If you have read your books of the Law you understand that to be such, the item must have been sanctified and blessed by the priests. In Judaism, that which was "Holy to the Lord" served in the temple in the religion of God (read the books of Moses), but in Zechariah we find that common things in the Day of the Lord are inscribed with "Holy to the Lord". This shows that all of creation will be in the service to the Lord. Creation itself will be sanctified and blessed by the priests of the Lord.





Now look at Romans. What do we find? St. Paul says that creation (and this includes animals and pets) has been waiting for the revelation of the sons of God and to be redeemed itself. What does it mean according to St. Paul for creation to be redeemed? It means to be put into the service of Christ instead of service to self. How is creation redeemed? It is redeemed through the sons of God..or rather through Christians. How is this done? By being sanctified, blessed, and put to the service of Christ. Each part of creation must be inscribed with "Holy to the LORD" on it.





So now then why are pets blessed? It is to fulfilled the need of creation and the command of God to sanctify and make holy all things.





Thus a Christian who does not seek to sanctify and bless the world around him, including his pets, does not act in accordance with scripture.





Message me if you have any follow up questions or other questions.
Reply:Please provide a Biblical reference that EVERY practice of faith must be found in the Bible
Reply:Do you really have a problem with Catholics blessing pets? How could you possibly have an issue with that? And in case you didn't already know, Catholics don't base every little detail on the bible. They're a little more well-rounded than that.
Reply:As you may already know, Catholics do have extra-biblical traditions. This is not a problem for Catholics, but it does seem to be for people of other faiths. Why not just let them have their traditions? If you don't like them, don't become a Catholic.
Reply:Blessing ANIMALS is fine. Saying that you own an animal is not. They deserve a life of their own. RESPECT THAT.
Reply:Try 1 Timothy 4:4-5.





And by the way, blessing animals is not required of Catholics. Nor does this occur (on or near the feast day of St. Francis, or any other day) in every Catholic parish.





What is your objection to asking God's blessing on what He has made, especially since the effects of Adam's sin have also effected all creation?





Edit: "Jesus did not die for animals!!!"


Well, no kidding. Who said He did? It's you who is stretching things to this meaning, not me.





You didn't want an answer.
Reply:Where in the bible does it say to break away from the one true church that existed since christ.





Where in the bible does it say thay communion in symbolic.





Where in the bible does it say not to baptise infants.





Where in the bible does it say that you should not confess your sins to others.





Where in the bible does it show Jesus not giving the apostles the power to forgive sins.





Where in the bible does it tell you to take out the books you dont like to fit your doctrine.





Where in the bible does it say that you can interpret the bible as you see fit without church tradition.


Any SC judgement saying that a writ can be issued for matters where a direction under 482 Cr.P.C cud be given?

there is a supreme court judgement which says that a writ under Article 226 can be issued in such matters where a direction can be given under section 482 of Cr.P.C. i need the judgement references....

Any SC judgement saying that a writ can be issued for matters where a direction under 482 Cr.P.C cud be given?
There are several judgments of the SC. To cite a few





1) State of Orissa Versus Debendra Nath Padhi


2005 (1) SCC 568





2) N. Natarajan Versus B.K. Subba Rao


2003 (2) SCC 76, 2003 AIR(SC) 541, 2002 (9) Scale 16, 2002 (8) Supreme 651, 2002 (7) SLT 378, 2003 (1) SRJ 507, 2003 (109) CrLJ 820, 2003 SCC(Cr) 437, 2003 (1) Crimes 235, 2003 (1) CCR 36, 2003 (2) CRJ 410, 2002 (10) JT 1





3) A.V. Mohan Rao %26amp; Anr. versus M. Kishan Rao and Anr


2002 (111) CC 390, 2002 (6) SCC 174, 2002 SCC(Cri) 1281, 2002 AIR(SC) 2653, 2002 (S1) SCR 175, 2002 (5) JT 180, 2002 (5) Scale 218, 2002 (5) Supreme 8, 2002 (4) SLT 429, 2002 (7) SRJ 250, 2002 (3) CCR 33, 2002 (3) RecentCR 561, 2002 (5) CRJ 77, 2002 (3) SCJ 381, 2002 SCC(Cr) 1281, 2002 (3) Crimes 1





http://www.firstappeal.com


What does H.C.F. stand for as referenced in Mere Christianity by C.S. Lewis?

He doesn't explain in the book, but a quick search indicates that Lewis was referring to the mathematical term "highest common factor". (This is the same thing as "greatest common divisor".)





In the context of "Mere Christianity", Lewis is using this term to mean those beliefs and practices that all Christians share, but that are not shared by non-Christians. It's what Lewis considered to be the core of Christianity that remains once the differences between Catholics, Episcopalians, Methodist, Presbyterians, etc., are all stripped away.





In "Mere Christianity", Lewis attempts to explain what this HCF or common ground for Christianity actually is.

What does H.C.F. stand for as referenced in Mere Christianity by C.S. Lewis?
This is just a guess... Holy Christian Faith... maybe.





That would be a reference to the sacrifice gospel preached by Paul. But of course Jesus preached the Kingdom Gospel which was an entirely different thing.

chrysanthemum

What is the meaning of B.C. and A.D. and why we use it?

Is it right that we are in 2007A.D.? how do we use B.C. and A.D.? what is the reference point? Is it After death of Christ? or B.C. before Christ?

What is the meaning of B.C. and A.D. and why we use it?
B.C.=Before Christ


A.D.=After Death
Reply:Basically, you've got it. The cross-over point is the birth of Christ, BC= Before Christ, AD=Anno Domini (Year of our Lord). There was no year 0 (although I've had a professor of math try to tell me there has to be because if you look at any number-line, there's always a 0 between -1 and +1). Technically, there wouldn't have been a 1BC AND a 1AD (unless Christ was born midnight December 31), since the same year would've been partially both.





The current preferred terminology is BCE (Before Christian Era) and CE (Christian Era) to recognise the fact that when historians originally dated the birth of Christ, they got it wrong and Christ was actually born in the year "called" 5BC. But clearly Christ can't be born before He was born and equally clearly we can't redate every book, every document, every medical and legal record, etc. so BCE/CE was chosen as a means of indicating "we know the calendar is out by 5 years and the actual date is 2012 but we're going to keep on using the current numbering system".
Reply:A.D means anno domini which is a year in the christian era and B.C means before christ
Reply:It used to be Before Christ and Anno Domino which is Latin for, I think, the year of our Lord. It seems to me people are now saying Before the Common era for B.C. I guess it's PC to use that now.
Reply:BC stands for "Before Christ". AD stands for "Anno Domini", which is Latin for "In the year of our Lord". They're Chrisitan references using the birth of Christ as the reference point. Some people are now using "BCE" (Before Common Era) and "CE" (Common Era) instead.
Reply:In Catholic terms...


A.D = After Death


B.C = Before Christ


but..


In more Modern terms..


B.C.E = Before Common Era


C.E = Common Era
Reply:Actually, now we use B.C.E and C.E. Before Common Era and Common Era. That's because AD means ano domine (in the year of our Lord) but not everyone believes in Christ as being Lord and Savior. So, now we use less religious words.
Reply:yes we are in 2007 AD. and b.c means before christ and a.d means after the death of christ.
Reply:B.C.-Before Christ


A.D.- Anno Domini (the Year of of Our Lord-birth of Christ)


We use it to describe timeframes and give a reference point to time. A.D. does not refer to the death of Christ.
Reply:0BC was the year christ died. then it was 1 AD,





12bc 11bc 10bc.....0......10AD 11ad 12ad





and so on.
Reply:Anno Domini (Latin : "In the year of (Our) Lord"), abbreviated as AD or A.D., defines an epoch based on the traditionally reckoned year of the conception or birth of Jesus of Nazareth. AD is also an abbreviation for Christian Era. Similarly, Before Christ (from the Ancient Greek "Christos" or "Anointed One", referring to Jesus), abbreviated as BC or B.C., is used in the English language to denote years before the start of this epoch.





The designation is used to number years in the Christian Era, conventionally used with the Julian and Gregorian calendars. More fully, years may be also specified as Anno Domini Nostri Iesu (Jesu) Christi ("In the Year of Our Lord Jesus Christ"). 'Anno Domini' dating was first calculated in 525 and began to be adopted in Western Europe during the 8th century.





The numbering of years per the Christian era is currently dominant in many places around the world, in both commercial and scientific use. For decades, it has been the global standard, recognized by international institutions such as the United Nations and the Universal Postal Union. This is due to the prevalence of Christianity in the Western world, the great influence of the Western world on science, technology and commerce, as well as the fact that the solar Gregorian calendar has, for a long time, been considered to be astronomically correct
Reply:AD stands for the year Christ was born in, not after he died.





Its short for Anno Domini, meaning "In the year of our Lord"
Reply:BC means before Christ AD stands for anno Domini and was used after Christ died.


Can you reference a referenced fact?

If you are writing a scientific paper, and there is a fact which is stated and referenced in another paper, and you want to use that fact in your paper...





A. Do you have find the original article and look for the fact and cite it





B. Or do you just cite the reference without having to look it up





C. Or can you just cite the paper where you found the fact?

Can you reference a referenced fact?
C.u can just cite the paper where u found the fact
Reply:you should look it up, just in case it was referenced wrong. Usually that doesn't happen, but you never know.


If an object is moving to a distant point at a speed approaching c, does the distance in between contract?

According to the Lorentz Transformation, an object, as observed from a "stationary" frame of reference, moving at a speed approaching c will contract in the direction parallel to the direction of motion.


Say an object is moving towards a distant star with a speed approaching c. The length of the moving object will contract in the direction of motion as observed from an outside frame.


Here's the question: Can't it be said that the distance between the moving object and the distant star it's traveling towards is also contracting?


I'm not talking about the fact that the object is moving towards the star, %26amp; that's why it's getting closer. I mean that the effects of the Lorentz Transformation are also contributing to the contraction of the distance.

If an object is moving to a distant point at a speed approaching c, does the distance in between contract?
yes, and this is actually observed in nature. fast atomic nuclei constantly rain down on earth, and sometimes, one will strike an atomic nucleus in earth's upper atmosphere. when one does, a particle called a muon is created. muons are very short-lived and should not have time enough to make it to the surface, but they do. the muons are traveling so fast that they see the distance between the upper atmosphere, where they originated, and the surface, where we detect them, as much shorter than we do so they have enough time to travel the short distance before decaying. also, we see the time of the muon dilated so much that they exist long enough to reach the surface.
Reply:yes it contracts but in the frame of the objet, in the rest frame the length is still the same
Reply:Yes and No.





In the "Frame of Reference" yes, in the "real universe," no. You can't actually make shortcuts in nature yet. And any Shortening is illusionary based upon the principle of your approach "towards the speed of light" and not based in the "universe at large." So, when you "slow back down" the illusion drops and you find yourself further away than you expected. However, you have to realize, that according to those "observing you" you yourself "forshortened also." Meaning what was a 1,000 ft spaceshp may have looked only 100 ft long when obseved from outside in the regular universe. However, this too was corrected when speed approached "normal velocities."
Reply:It is the length of the object itself, measured from the original "at rest" frame of reference, that contracts, and the mass increases. At C the length is zero, and the mass is infinite, obviously asymptotic (not achievable).


Time also slows, and this has been tested at much lower speeds with extremely accurate cesium clocks.
Reply:Yes
Reply:Yes. That's why ultra-relativistic muons are able to make it to detectors here on Earth before decaying.


What does R.S., 1985, c. 30 (4th Supp.) means in Canadian law?

I have to translate a Canadian Act: Mutual Legal Assistance in Criminal Matters Act R.S.,1985, c 30 (4th Supp). From what I understand "R.S.,1985, c 30 (4th Supp)" is like a reference but what I don't understand is that why after that it says " [1988, c 37, assented to 28 July, 1988]? What happens with the year 1988? Or chapter 37? And why "assented to 28 July 1988" while the reference after the title of the Act is R,S, 1985.....? That means it became an Act in 1988 but it was published in the RS in 1985? And what is a Supplement exactly? Anyone who knows about this, please help. I am so desperate.

What does R.S., 1985, c. 30 (4th Supp.) means in Canadian law?
It mean is was a 1988 Act which was supplement by the 1985 revision act which suppose to add on, change or delete something from the 1988 Act

daffodil

There are two types of ____ parameters: value parameters and reference parameters.?

There are two types of ____ parameters: value parameters and reference parameters.





A. actual


B. formal


C. active


D. passive

There are two types of ____ parameters: value parameters and reference parameters.?
The answer should be A. Because a formal parameter is just a dummy parameter.





Value parameter is the one that is just a copy of one parameter. and reference parameter is the one that contains the pointer to one parameter. when reference parameter is changed the original value is changed. but it does not happen in the case of value parameter.


C++ which two types of parameters? (more details)?

There are two types of ____ parameters: value parameters and reference parameters.?





A. actual


B. formal


C. active


D. passive








the test says the answer is A. but in the book it shows the answer as being B. so I'm really confused %26gt;_%26lt;

C++ which two types of parameters? (more details)?
They are function parameters so the answer is B - formal.





Value parameters are used to pass information into a function. Reference parameters are used to pass information in and out of a function.





i.e. type function-name (formal parameter type list);


The term angle of deviation is used in reference to ?

The term angle of deviation is used in reference to?


A polarizer.


B prism.


c.lens.


D. an analyzer.

The term angle of deviation is used in reference to ?
prism.





(polarizer - phase shift; lens - angle of relection,refraction; analyzer - phase)


How can I reference part of an Excel page in the header?

I have got a spreadsheet to repeat a title row on every page when it prints.


Is it possible to have something in this title row reference a cell on each page so that when it prints a different value will appear on each page?





I don't know if I'm being clear so here's the technical bit.





Suppose I use page setup to have row A repeat on every page I print, and then I have page breaks before row C, D. Can I have cell A1 reference cell B1 on page 1, C1 on page 2, D1 on page 3 and so on?

How can I reference part of an Excel page in the header?
In Page Setup up on the Sheet tab, there is an option of Rows to Repeat. This will use that row for the top of all pages printed.
Reply:use the help, not real people.

hyacinth

Error with Visual C++ Express 2005?

When I try to compile my C code in Visual C++, I constantly receive the following error message:


MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup


C:\SDP\Debug\SDP.exe : fatal error LNK1120: 1 unresolved externals


Does anyone know how to fix it?

Error with Visual C++ Express 2005?
1st place you should look anytime you have a problem with any thing microshaft related is MSDN..





Try this link





http://forums.microsoft.com/MSDN/ShowPos...


Excel spreadsheet reference issue?

I have a spreadsheet with tabs A and B. A has figures I have input, B is a calculation page based on A's figures.


I have another spreadsheet with tabs C and D. C is identical to A but has different figures on it, therefore even though the formulae are identical on B and D they will show different results (as they are based on different input figures).





Now assume D is blank (and there are a hundred of these spreadsheets all with blank 'D's'). I want to copy B to D, F, H etc... so that the formulae are identical to that of B's. BUT if I copy and paste the formulae the new B's reference back to A rather than C, E, G etc...





Can this be done?

Excel spreadsheet reference issue?
Is probably an easier way than this, but if u highlight the entire sheet in which you want to change the formula on, hit Ctrl H to replace, where it says 'find what' put in the sheet ref in the formula eg. sheet A, and in the 'replace with' put in sheet that you want to read formula from eg sheet F etc.
Reply:You will need to change all the references yourself, Use the find/replace function





Copy the sheet, and highlight the whole sheet, next click on the home tab and Find/Replace. Click on advanced options and make sure that Find in Formulae is enabled.





Search for A! (the referance to sheet A) and replace with C!, E! or G! the (referance to the sheets you want)





Click replace all and your done!
Reply:You can either


i) Do as you are doing and then do a global find %26amp; replace on the CD EF sheets so that the formulae reference the correct page


ii) Reverse the process and paste the values from C E etc onto the AB sheet and save over the blank sheets.


If I think someone is giving me a bad reference...?

I'm planning on applying for a new job tommorow at a grocery store, but the application asks for your two most recent places of employment.





I'm worked at three different places in my life (I'm 19), two of which were for the same company.





Place A from March 2004-November 2005


Place B (same company) from November 2005 to June 2006


Place C from June 2006 to November 2006





And since then I haven't been working. Problem is, I fear my boss from Place C is giving me a bad reference...we had some issues, but I thought we'd smoothed it out so to speak, so I had him listed on my resume. After a number of strikeouts while looking for a new job, I decided to take that Place C manager off my resume - but now this job asks me for my most recent employment, and asks for the phone number?





What should I put down? Should I just strike Place C from my resume and act like I never went there?

If I think someone is giving me a bad reference...?
there is usually a place on applications where you can say if this employer can be contacted. just put no.
Reply:i dont think you're allowed to give a bad reference by law.


You can choose not to give a reference.


"i think"


Please help me with a reference?

I am using the van der Waals Gas Equation and its critical parameter a and b for CO2 for a research, but I cannot find where they come from. I am drafting a paper and I need a reference. I know,





Reid, R. C.; Prausnitz, J. M.; Poling, B. E. The Properties of Gases and Liquids, 4th ed.; McGraw-Hill, Inc.: New York, 1987.





Or





Fishbane, Paul M., Gasiorowicz, Stephen G., and Thornton, Stephen T., Physics for Scientists and Engineers, 3rd Ed., Prentice-Hall, 2005.





but I cannot find its chapter or exact page.





Could anybody please help me? Thanks a lot.

Please help me with a reference?
Well...for CO2 I have:





a = 3.658 bar L^2/mol





b = 0.04286 L/mol








If you are doing research at this level...have you forgottn about the trusty CRC handbook for Chem/Phys?





That's where I found my data. Mine is 77th edition page 6-48.





Hope that helps.
Reply:The a and b are constants peculiar to each gas. you look them up in a table. see:





http://www.ac.wwu.edu/~vawter/PhysicsNet...

poppy

How to create librariees in c?

i am told that if i want to use user defined functions of one c program can be used in the other c program, i have to store them in library. i don't know how to create the libraries in the language c. can any one tell me how to create libraries in c?








And also can any one suggest me the best reference book for the language c?

How to create librariees in c?
The best reference book would be "Let us C"





http://www.fallensword.com/?ref=1105967


Need reference to algorithm that allows to decrease amount of points in chart dataset without losing meaning?

Need reference to algorithm (Java or C#) that allows to decrease amount of points in chart dataset without losing much of statistical/visual validity





For example dataset may have 5000 data points, but I need to reduce it to 500 (10%)

Need reference to algorithm that allows to decrease amount of points in chart dataset without losing meaning?
put in your java script 500 cd, type clrddds and press enter. you must delete all data sets charts so the comp has a clear idea of the visuality of the items. only the statistics from 3 months ago will show. i dont know why b ut the visual must be set to 15% for you to see the c drives options,
Reply:You need to filter the data. For a 10:1 reduction in the data record, you need to apply a digital anti-aliasing filter. Then decimation in time to cull the unwanted interstitial points.





For example, in your example, take your 5000 data points and run it through a low pass filter with a digital bandwidth of 0.09*pi radians and with a stop band attenuation of at least 80dB, then take every 10th point and put it in your new array. You will end up with 500 points that preserves as much information about the original record as can be achieved.





Another way to do this is to take an FFT of the points and apply and inverse-FFT to the fraction that constitutes the lowest frequencies. Easier to do when working with record lengths on powers of 2





For example, take 8192 points, perform an FFT on them. Keep the first 512 points and the last 512 points and mash them together to make a 1024 point record. Then shove that through an inverse-FFT to get a 1024 point compressed record of the original 8192 point record.
Reply:not into java or c# but i can di it in php
Reply:In the real world, we would sample the randomly sample the data set. In most cases, the sampled data set would give "nearly" the same results as the full data set.





Unless you have duplicate data points, or a simplistic linear data relationship among your original data points, you will lose some meaning by reducing the sample size -- no matter how you choose the data points.


Reference Manual needed?

i need the Reference Manual for the olympus c-350 zoom camedia as my little one got her hands on it and now i need it as i dont no how to turn the flash off can you help me...........thanks

Reference Manual needed?
here is their website http://www.olympus.co.jp/en/support/imsg...
Reply:download it here


http://www.olympus-europa.com/consumer/2...
Reply:Down load it from the sites listed by others but make sure you have plenty of paper in your printer as it will only be printed on one side,
Reply:go to manufacture site and download


Does anybody know the .bmp structure?How can I make C++ or C# create images?

I need to know how to code bmp to create images automatically in a C++ code.


(Looking for References, or examples)

Does anybody know the .bmp structure?How can I make C++ or C# create images?
Bitmaps have information headers which comes before the actual data. If the bitmap has 8 bit graphic data, then the palette is stored between the headers and the bitmap data. The info on the headers is here:


http://msdn2.microsoft.com/en-us/library...





There are actually 3 BITMAPINFOHEADER structures (BITMAPINFOHEADER, BITMAPV4HEADER, and BITMAPV5HEADER) but you can just use the standard BITMAPINFOHEADER. All graphics programs should support all 3 header types.

cosmos

How can i define two mutually referencing structures in c.?

typedef struct _Node


{


struct _Containter *parent;


struct _Node *next;


struct _Node *prev;


char *Data;


} Node;





typedef struct _Container


{


struct _Node *parent;


struct _Container *next;


struct _Container *prev;


struct _Node *children;


char *Data;


} Container;





In the above example, A Node structure references a Container structure and a Container structure references a Node structure.


In C++, what happens when a recursive function passes an array to itself?

I know that in C++, arrays are passed by reference and not by value. So if I have a recursive function that accepts an array and an index as arguments, what happens on the recursion?





If I pass the inbound array to an array that is local to the function, will that prevent the recursive calls from operating directly on the initial array? And will a new instance of the local array be created with every recursion?





PS, the array is of maximum length 4 and type int, so I am not worried about memory consumption.

In C++, what happens when a recursive function passes an array to itself?
You can't expect C++ to create a new copy of the array each time, C++ just isn't that sort of language. You would have to create some sort of array copy function, and use that before each recursive call.
Reply:In this situation the initial array will remain untouched, since you will be operating on a local copy. A new local copy will be created for every recursion and they will all stay in scope until your end condition is met, then they will proceed to leave scope in reverse order.





If you do not want to change the initial array but want to see its values, just pass by const reference, using the "const" keyword.
Reply:It seems like you understand the issues, so rather than answer directly, I'll ask a couple of questions.


If the maximum length of the array is four, why don't you just unfold the loop (or whatever) that's operating on the array, and deal with four variables directly?


What is it that you are doing to the array that makes you not want to affect the original copy? Is that the "right" thing to be doing? You're porting something, but you don't have to be a slave to an implementation that was awkward/illogical/dumb, or that was dictated by limitations in the original language. Do you?


Can i have some help in c++?

i am very new to c++ and programming in general.


i bought a book called c++ all in one desk reference for dummies.


i am a few pages in and im having trouble making words come up into a dos box.





im using a program called dev-c++





#include %26lt;iostream%26gt;


#include %26lt;stdlib.h%26gt;





int main(int argc, char *argv[])


{


cout %26lt;%26lt; "Hello, i am your computer talking." %26lt;%26lt; endl;


system("PAUSE") ;


return 0;


}








when i enter that, the error box on the bottom of dev-c++ says





line 8 message: cout undeclared (first use this function)





line 8 message: endl undeclared (first use this function)





also, if i delete line 8 of that, it works fine, a dos box pops up and says press any key to continue.





if you could please give me a few tips upon what i might be doing wrong,


please tell me!

Can i have some help in c++?
You need to either change line 8 to read:





std::cout %26lt;%26lt; "Hello..." %26lt;%26lt; std::endl;





Or add:





using namespace std;





After the #include lines.





You have to tell the compiler in what namespace to find cout %26amp; endl; the first does it explicitly, the second makes all names in the std namespace available in your program.





Edit to luv l: No, it's not %26lt;iostream.h%26gt;, it's just %26lt;iostream%26gt;. The standard library does not use .h for its headers; the .h versions are deprecated and should no longer be used, as they do not use the std:: namespace.
Reply:You need to specify that your working with the standard c++ namespace.





type in "using namespace std;" before your 'main' function.





alternatively, you could use std::cout %26lt;%26lt;" blah blah"; instead if you preferred, putting the std:: before every cout/ cin / any other standard function.





Im new to c++ too, sorry if my terminology is a bit worng.
Reply:#include %26lt;iostream%26gt;


using namespace std;





int main()


{


cout %26lt;%26lt; "Hello, i am your computer talking." %26lt;%26lt; endl;


system("PAUSE") ;


return 0;


}
Reply:its not iostream


its iostream.h


try this it will work
Reply:firstly, about the cout thing. (i have dev-c++) change the line #include %26lt;iostream%26gt;


to


#include %26lt;iostream.h%26gt;





now you should be aware that a dos box will always pop up (unless you use win32, that's not the case however)


what the system("pause") function does is to display "press nay ...'


Doctor told me i have hepetitis c but can the results be false if my cholesterol is high?

Everything on the recent blood results are normal exept for my RBC (5.7), Hemoblobin(18.1), Hematocrit(53), ALT(SGPT)(74). My Lipid Panel Shows Cholesteral, total (314), LDL Cholesterol Calc(240). One doctor says that my liver is getting messed up by the cholesterol. The other doctor said i have hepetitis c from a second blood result. Wouldn't the first doctor know by the numbers[ALT (SGPT)] that i have hep c or do numbers matter? Reference Interval shows 0-55 and mine is 74. Is it possible that i don't have hepetitis c and that it is registering that i do or like i said, does the numbers matter? I'm on medication for the cholesterol and have changed my eating habbits,working out/walking and just taking care of myself. Doctor said that the liver which i guess is ALT(SGPT) should go back to normal if i do what i'm doing,cholesterol can be reversed but the real question is it possible that i don't have it and this number i have may be giving the readings that i have hep c? Please HELP!

Doctor told me i have hepetitis c but can the results be false if my cholesterol is high?
hey pal...we are only humans we make mistakes..but they are doctors they are not 100% accurate they just diagnose...if a doctor said u have liver problem and the other 1 hepa C..then they are both correct..just doo the necessary healing or therapy..consul each doctor.drink the necessary medicine avoid the necessary things to avoid and lastly pray.thast it! fight fight fight on! but just dont be too physical..ok! get it got it good!

online florists

C++ Interop, anyone with decent references?

I got some code which is in ATL C++ .dll files and I want to do my abstract layer within .NET C#, I am wondering if any of you have experience on such field.





I am having difficulty finding a way to use interop to use my native c++ code into c#.





I have some 3D applications using some library in C++ and I need to access it within c#. Thanks...

C++ Interop, anyone with decent references?
http://www.codeproject.com/dotnet/comint...





Very good article.. Read it!


C# & ms. SQL server?

does anyone know any good reference or book for c# programming on doing database thing with ms sql server.

C# %26amp; ms. SQL server?
You'll have to learn by doing, but you can go to w3schools to learn the basics. Trying doing a search in yahoo and google for "MS Sql Server Tutorials" quotes included.
Reply:Wrox's ADO.Net is a fantastic book on .NET data programming. It doesn't focus much on SQL-Server specific topics, but there's good reason for that.





http://www.wrox.com/WileyCDA/WroxTitle/p...





.NET largely levels the laying field for database access. In .NET programming, you would work with a SQL database much like you would with an OleDb one - the only difference being that you would use a SqlCommand, SqlDataAdapter, SqlConnection instead of OleDbCommand, OleDbDataAdapter, and OleDbConnection.
Reply:Mastering C# Database Programming
Reply:for any book related stuff... visit www.flazx.com





see u need not have to buy books... u get a copy in that site...


Sorry if i ask this Question again!!! (Microsoft Visual Studio.net C++!!!?)?

How hard is it to learn programming using it?? I've already got a book with 1200 pages describing it. I've also got the softwares needed.





I'm thinking 1 year?? or more??





I usually learn fast when it comes to computers. I'm thinking about practicing like 4-5 hours every day.


the book title is Visual C++.net : the complete reference

Sorry if i ask this Question again!!! (Microsoft Visual Studio.net C++!!!?)?
C++ is a complex language. Aside from knowing the syntax of the language, writing good programs means understanding of the computer hardware. You'll be writing lower level programs than, say C# or Java. Consequently, you'll need to make good design choices.





If you have never programmed before, you have an additional challenge. Aside from learning C++, you need to learn computer science concepts. Sorting algorithms, linked lists, search algorithms, and so on. And you'll have to start learning about various protocols and details to write serious programs. This will take a few years to get to an intermediate level, if you are completely fresh.





A piece of advice when it comes to C++. You need to understand that C++ is a standard language. Whether you program on Linux or Windows or Macs, with Visual C++ or gcc, the language stays the same. Consequently, it is important you learn standard C++ first, rather than how Visual C++ does a few things like making GUIs or the like. If you seriously want to learn C++, I recommend either C++ Primer by Lippman or Accelerated C++ by Koenig, as both are by actual C++ gurus. Google the books on Amazon and order one of them.





You can look up book reviews on ACCU (google it!).
Reply:learning programming depend on how u comprehend interlectually. To some its long and to some its very slow ,at the end they all achieve their aim.
Reply:Learning C++ isn't too difficult. However, one book can't explain everything and some books aren't written well. Look around book shops for other books on C++ programming. Also, examining source code will help too. Look around the Internet. There's plenty of places where you can get source code and information on programming in C++. There are also web sites with forums where you can get help.
Reply:What's the reason behind you wanting to learn c/c++ ? PRogramming today is all about learning the RIGHT LANGUAGE for the type of programming you want to do.





C/C++ is best suited for systems programming, hardware programmiing, games, graphics and animation etc. To really use the language effectively, you first need to learn the core language very well, then learn an API that goes with what ever type of progam you want to create. If your going to work in graphics you want to learn a C/C++ Graphics toolkit.





All professsional programs are built on Toolkits and libraries





So it comes back to what kind of software do you want to make let that dictate the language to learn.





Good luck.
Reply:Programming is very complicated and the books dont seem to break things down so good luck with that.
Reply:Programming is a lifelong learning experience. You'll never know everything and things are always changing. But, I would assume that if you actually stuck to it and studied, you could become fairly proficient with Visual C++ in a year or two. My university program I just graduated from typically requires the freshman and sophomores to work primarily in C++ for almost their entire first two years to make sure that they are capable of knowing all of the basics of it in a single language before branching out into others.





I would say, however, that if you are a relative novice to computer programming...Visual Basic.NET would be your best route. You already have Visual Studio, I would definitely suggest going towards VB.NET before attempting to tackle more complex languages like C++.


Need help with compound intertest program i am writing in C language?

this is a program i wrote to count the compound interest, but it's not working it's giving me following error message when i compile


"compound.c:(.text+0x69): undefined reference to `pow'


collect2: ld returned 1 exit status"


following the code





#include %26lt;stdio.h%26gt;


#include %26lt;math.h%26gt;





int main()


{





int rate;


int amount;


int p;


int n;


p=24;


printf("Rate\t\tAmount");





for(rate=5;rate%26lt;=10;rate++){





for(n=1; n%26lt;=381; n++){


amount=p*pow(1+(rate/100),n);


printf("%d\t\t%d", rate,amount);


}


}


return 0;


}

Need help with compound intertest program i am writing in C language?
You look like you are building with gcc and linux. Add '-lm' to link in the math library.





You will also want to chage 1+(rate/100) to 1.0+(rate/100.0) or something like that to make sure the math is done in floating point - as I don't think you want the integer truncation.


Good luck.

flowers uk

Thermostat for C200 Matic '96. Which is the best temperature setting for this thermostat? 71 C, 87 C or what?

Sometime, mostly vendors offer the thermostat with setting temp of 71 C instead of (higher than this or 87 C). Based on the reference I got, the current engine (newer not old engine) will run in better performance when apply the higher range of this thermostat i.e. 82 C to 91 C. Beside that, combustion will be more effisien and redue the polutant. Would you please tell us about the proper thermostat temp setting selection? thx.

Thermostat for C200 Matic '96. Which is the best temperature setting for this thermostat? 71 C, 87 C or what?
All kinds of engines work at their best between 80 an 90 Celsius.Surpassing 90 a little bit is not a crime against humanity.I have some engines that work great at 95
Reply:Stay with stock,the computer, needs a stock thermo.
Reply:i have that at my moms house, her place isn't big so 71 i good to keep i Constance setting


Microsoft Visual Studio.net C++!!!?

How hard is it to learn programming using it?? I've already got a book with 1200 pages describing it. I've also got the softwares needed.





I'm thinking 1 year?? or more??





I usually learn fast when it comes to computers. I'm thinking about practicing like 4-5 hours every day.


the book title is Visual C++.net : the complete reference

Microsoft Visual Studio.net C++!!!?
dont worry its easy....only the concept needs to be mastered and rest is all ur creativity....as u said u learn quicklyu wen it comes to computers.....thts the plus point u have .go for it dear....and dont fear .tk cr GOD BLESS U
Reply:Well sure you can get a hold of it but will take time what I would suggest is practise a lot .. keeping trying all the programs in it and sometimes even exercise.


What is C.E. as referenced to in a year? For example, 900 C.E.?

It stands for the "Common Era". So BCE is "Before the Common ERA" and "CE" is just the "Common Era"

What is C.E. as referenced to in a year? For example, 900 C.E.?
http://en.wikipedia.org/wiki/Common_Era





Well as an atheist, I don't want to say Christian Era, I don't know why people want to Christianise everything, so I like saying Common Era. Anyway read up about it on Wikipedia, you can find anything intellectual on wiki.
Reply:It stands for Christian Era
Reply:CE does stand for Common Era, and BCE Before the Common Era. There are two reasons for the change from BC/AD to BCE/CE. 1. Non-Christians, and there are many, believe this era is also theirs. 2. The idea that BC occurred before Christ's birth and AD after it is flawed. Christ was born in either 4 or 6BCE, based on astronomical calculations. There is also no year 0, so the birth of Christ has no chronological space in that system. It is not a denial of Christ's birth or Christian faith to partake in the new distinction of time. Our eras are our way of counting time. They are named for ease of understanding when an event took place and the old BC/AD system was centered on the suposed birthdate of Christ, but this was not the first system and the years have been called many things, obviously the people here before Christianity did not know when Crist would be born and did not consider themselves in a countdown to that date, not even the Jews who were (and still are) awaiting the event. There's a lot of interesting information on how the years were counted and named in ancient times.
Reply:"common era" - represents birth of Jesus Christ - same as A.D.
Reply:Mrs Potts-Reilly is very silly. Our calendar was created by Pope Gregory and is a Christian calendar. The number 2006 has no meaning other than referring to the years since Christ's birth. Replacing Anno Domini with CE is a politically-correct attempt to erase our history and pretend Christianity has not shaped our society. Muslims also have their own calendar dating from Mohammed - do you think they'll ditch their tradition? Will they heck.
Reply:simple it stands for christian era C.E
Reply:C. E. stands for "Common Era"





This is used instead of A. D. by countries and cultures who do not recognize Jesus Christ as the "marker" for the beginning of the modern era.
Reply:according to Gale's Acronyms, Initialisms and Abbreviations Dictionary, 37th edition, p. 868 C.E. is "Common Era" and "Christian Era."





Random House Webster's Unabridged dictionary only lists "Common Era" and NOT "Christian Era."
Reply:It's the same as AD, just political correctness has made it CE instead to remove the christian connotations.
Reply:Depends on who you ask....





Some will say the Christian Era.





Some will say the Common Era.





Both are used.
Reply:CHRISTIAN ERA!!B.C. IS TO DENOTE BEFORE CHRIST!!A.D. IS LATIN ANNO DOMINI..THE YEAR OF OUR LORD!!THE JEWS ARE STILL WAITING FOR THEIR "MESSIAH" AND THEIR YEAR IS IN THE HIGH "5000'S" AT THIS POINT!!
Reply:since this has been adequately answered, I'd like to comment that Christ has done more to shape the whole worlds' societies than any other person or force in all of history, yet never wrote a book or left the area where He lived [when he was yet embodied as a man].
Reply:Common Era?
Reply:C.E. stands for Common Era. The old "BC" (before Christ) is typically referred to now as Before Common Era (BCE) and after the birth of Christ, "Common Era." Hope this helps.
Reply:C.E. means Common Era. We are in the year 2006 C.E.
Reply:It stands for 'Common Era' just as 'B.C.E.' stands for 'Before the Common Era'.


It replaces the bigoted 'BC' and 'AD'. (Before Christ and Anno Domini)





Until reading some of these answers, I was unaware that the Xtians have tried to pervert it already!
Reply:C.E. stands for the common era. It is now the "political correct" way to say after the death of Jesus, formerly known as AD
Reply:common era


C & C++ (Should I go straight to C++)?

I have just completed the C for dummies book, and it has just recommended me to purchase the C all-in-one reference for dummies, which I have... the book was excellent, and I loved every minute of it, so I have no doubt I shall love the next book (also by the same author)...





Problem is, knowing that C++ is the better (or newer should I say) of the two, should I really spend a great deal of time learning its predecessor?





I will be going straight into C++ the moment I learn everything there is to learn about C, so I won't be missing out in any way. I'm just curious as to whether learning C to such extent will allow me to learn (and understand) C++ any better once I get in to it...

C %26amp; C++ (Should I go straight to C++)?
Yes, C++ is a super set of C. If you can do it in C the same code should compile and run fine in C++. Also there is the added benefit that some programs are written in C not C++, i.e. most OS and device driver work. If all you know is C++ you will have a difficult time working in C. But then again that depends on what you want to do. Part of this is because even though C++ is compatible with C, properly written C++ code looks very different from good C code. A C++ programmer has to deal with exceptions, inheritance and the like, which can make your life very good, and also a bit more confusing.





You really should check out Effective C++ by Scott Meyers, if you want to know how to program well in C++. But a solid understanding of C will not hurt you in any way.
Reply:yes, u will stay in the same logic.. but new horizons would open to you with c++.. after that u can go to the C#..
Reply:OK, as similar as they *seem* on the surface, C and C++ are two different languages. They are generally used for different purposes as well. C is not hard to learn well, it is small and you can do a lot of stuff with it. If you want to code device drivers and OS utilities I would go with that. C++ is used more often these days for more general programming, but is a lot more complicated and can be quite confusing. Knowing C well will not necessarily help you with C++. If you don't plan to use C much, I would just skip to C++ since it seems that's the language you are aiming to learn.





Good luck.
Reply:I've been program in both C and C++ (and C# now) for years. The syntax for all three is the same. If you are comfortable with C then move into C++. It will reinforce what you've learned and introduce to better error handling and OO programming as well.

hamper

How do I complile a VB.NET 2005 (.vb) class to a dll so I can use it in my c# project ?

I have a vb.net class that I need to use in my c# project. If i had a dll i know i could reference it and use it. But without having a DLL how do i either use it or compile it to a dll so It can be accessed / referenced by my c# project.

How do I complile a VB.NET 2005 (.vb) class to a dll so I can use it in my c# project ?
Create a VB.NET Class Library project, after Building it and Compiling it, look in the project folder such as C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\MySolution\Myproject\bin\D... for the .DLL...


Where does C. S. Lewis write "If christianity is false..." I can't find it. I have God in the Dock. Urgent

Hi


Need to deliver an assignment at 10:00 AM Thursday Middleeuropean time, and I need a reference for the C. S. Lewis quote: "Christianity, if false, is of no importance, and if true, of infinite importance. The only thing it cannot be is moderately important"


I can see, that some people tells it is in "God in the dock" I just can't find it.


I have Walter Hoopers edition from Harper Collins 1998. Could someone tell me which essay it is in, please?


The better the reference, the better.

Where does C. S. Lewis write "If christianity is false..." I can't find it. I have God in the Dock. Urgent
I'm pretty sure it is a few pages before the end of the essay "Christian Apologetics" from God in the Dock.





I'll verify that if I can and get back to you.





OK verified. Find footnote 18 in "Christian Apologetics." The quote you are looking for is in the following paragraph.





The exact quote is,





"One must keep on pointing out that Christianity is a statement which, if false, is of no importance, and, if true, of infinite importance. The one thing it cannot be is moderately important."





The word "no" is italicized in the book, but I cannot replicate that here.





Good luck on your assignment.





The version I'm looking at is the U.S. paperback version published in 1994. I feel certain that it is this version one is seeing on line at this site:





http://books.google.com/books?id=I6xWiVD...





The quote is on page 101.





Well I've edited this response a number of times. The version on line apparently is not one I listed earlier, but was publiched in Michigan, USA. The Title page shows the some of the publication information.





http://books.google.com/books?id=I6xWiVD...





The best I can do at this point, without knowing more of your situation, is to point to this page:





http://www.amazon.com/review/product/080...





On it is a list of essays and a list of collections, with an indication of which essays are published in which collections. It contains a reference to "Christian Aplogetics" and notes four other collections besides "God in the Dock" that contain this essay. These are:


(1) "The Grand Miracle, and Other Selected Essays on Theology and Ethics"





(2) "Timeless at Heart: Essays on Theology"





(4) "First and Second Things: Essays on Theology and Ethics"





(6) "Compelling Reason"








Please let me know whether this is helpful to you.


Why cannot we create an array of references in C++?

What would it reference if you could?


What is reference operator and pointer operator?

what is reference operator in c

What is reference operator and pointer operator?
There is no reference operator in C, that's a C++ thing.





In C++, within the argument list of a function declaration or prototype, %26amp; is the reference operator, and * is the pointer operator. e.g.,





int foo(int *pointer, int %26amp;reference);





Note that in the example above, "pointer" and "reference" work almost identically, in that the called function can alter the contents of either argument, as seen by the calling function. The difference is that a pointer type must be passed by address, and dereferenced to obtain the value it points to. For reference types the compiler does that for you. e.g.,





// sets the value of first 2 args to 1


int foo(int *pointer, int %26amp;reference, int val)


{


// first arg is pointer, must use dereference operator


// to access contents


*pointer = 1;


reference = 1;


// we could assign this 10,000 times, but the


// caller will never see it, because it was passed


// by value.


val = 1;


}





int main(int argc, char **argv)


{


int i1 = 0, i2 = 0, i3 = 0;





// first arg is pointer, must use address-of operator


// to pass its address


foo(%26amp;i1, i2, i3);


// both i1 and i2 now contain the value 1


// but i3 is still 0


//...


}





(To confuse matters, %26amp; is also the address-of operator, and * is also the dereference operator, it depends on where they are used.)

bloom

Error in borland c++ builder?

[Linker Error] Unresolved external 'hasp_login' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\DONGLEP...

Error in borland c++ builder?
Well to find out the exact problem we'd have to know whats after the ...
Reply:you have to link against the hasp library. look at the hasp samples, they have a borland sample. it comes with a makefile or a batch file, which links the hasp library.
Reply:Maybe your setup of your compiler is wrong. patch up this codes.





#include %26lt;iostream%26gt;


using namespace std;





int main()





{


cout %26lt;%26lt; "Hello World" %26lt;%26lt; endl;





return 0;





}





If you can compile and run this, then your compiler is working properly.


How to make a c# dll that cannot be referenced by other project?

i've made a c# program,one exe and one dll,


now i just want my dll can only be used by the exe file,and it cannot be referenced by other project,so that the public members of the dll are inaccessible to others. and it cannot be parsed by the MSIL Disassembler program in Visual Studio Tools





help me please...


help me,

How to make a c# dll that cannot be referenced by other project?
The short answer is you cannot, but you can make it difficult.





Read on for the long answer if you care.





What it sounds like you want to do is use some sort of a DRM solution. The basic concept behind DRM is that you have your files encrypted, and only give the decryption keys to programs that are trusted not to do things you don't want them to.





In this case because it is an actual program or part of a program then you need to have windows do the decryption, or decrypt it yourself just before windows uses it, but that leaves a lot of other security holes. The problem is that Windows does not support this type of thing natively, so you have to write, or buy, extensions to Windows that will.





But, Windows also supports debugging tools and hibernate which can give someone else access to your unencrypted dll in RAM so you have to patch windows to some how keep other people from seeing the dll through these interfaces. But even then someone can load up your program and through some hardware hacks read the RAM out of your computer on another computer that is not trying to protect it. Or run windows in a simulation of a computer and just pull the unencrypted data out of where ever windows decided to put it.





If what you are trying to hide is valuable then just give up now. Sony, Microsoft, Apple and many many others have all tried this sort of thing and all of them have been cracked, because you cannot keep something secret if you do not control the hardware it is running on. What is more trying to keep people out may just tell those very people that something here is valuable and make them want to get in.





What you can do, and this will keep out most of the people is first don't use a dll. Why split the program up into two if you don't have to, especially if you don't want anyone but your program using your dll. Second strip out all unnecessary debug info. Most script kiddies will not go looking inside a single program and even if they do with no debug info most will give up fairly quickly, but not all. And stripping a program is common enough everywhere that real hackers will not think twice about it.





You also could try and use an obfuscater to make your program more confusing and jumbled, but again that is likely to just draw attention and make people try and hack in.





If you do find a way to truly protect the data on an untrusted computer then patent it quick. You will make some very serious money selling it to every Music, Movie, and Game company out there.


Operator Overloading in C++?

Explain in Details Operator Overloading in C++ with Web reference.

Operator Overloading in C++?
go through the operator overloading section in stroustoup's C++ book and do yourself an favour by coding few overloading example
Reply:http://www.cs.caltech.edu/courses/cs11/m...
Reply:Operator overloading is under polymorphism a special feature in C++. While the operators in C have usual meaning operator overloading in C++ allows us to overload the operator to give the certain user defined functionality to the operator.





Syntax goes like this


operator x(arguments)


{


functionality


}





where x is an operator





operator overloading is generally used to operate the objects using operators instead of operating their members.


Some riddles in C?

Functions in C++ takes the refernce type or objects also as its parameters.What is it ?





Functions in C++ return the reference type or objects value to the function from which it is invoked. What is it ?

Some riddles in C?
What is what? Do you mean which is it (reference or object)?





Sounds more like a test question than a riddle.
Reply:didnt get what ur askn about =S

dogwood

Sunday, July 12, 2009

Question on call by reference?

in c call by reference is done by pointers explain how exectly memorey locations are called by reference by pointers

Question on call by reference?
Pointers are just special variables, which stores address rather than just normal values.





For any kind of variable compiler stores info about attributes and values (includes datatype, addr ... ) in a table like datastructure which is specific to compiler.





In case of call by reference u actually pass the addr rather than just value of variable.





let us say :


{


int a=2,*b;


b=%26amp;a;


f(%26amp;a); //f(b)








}


f(int *c) { *c=5; }


g(int d) { d=6;}








before proceeding first u need to understand what


"x=8; " this statement does.


It just finds the x's address by looking at the variable table and


then in that memory location the value is updated with 8.








Now coming to our example....


If you observe carefully, the function f() is accepting the address rather than value of variable. So all the updations will happen on the original location.


where as incase of g() it just updates the local variable.
Reply:Memory locations cannot be called by reference as far as I know about programming with the C language.





To be correct, C implements only one way of function call. It is call by value. In call by value, a copy of each of the argument is created locally in the invoked function. When you pass a pointer (in C, that is,), _a copy_ of that pointer is created locally in the called function.





The symbol table is used to decide whether dereferecing has to be used on a variable. That is, symbol table has details like whether a variable is a plain variable or a pointer to something.





In the case of a pointer, the value stored in that variable is treated as an address in the memory. Accordingly, relevant dereferencing instructions are generated.
Reply:A reference is an indirect pointer that doesn't look like a pointer and isn't addressed as such. All addressing is done by the compiler.





Example:





void AnswerToEverything(int%26amp; iAnswer)


{


iAnswer = 42;


}





void main(int argc, char* argv[])


{


int i = 0;





AnswerToEverything(i);





/* The value of the variable i is now 42 */


printf("%d\n", i);


}








Same example with pointers:





void AnswerToEverything(int* piAnswer)


{


*piAnswer = 42;


}





void main(int argc, char* argv[])


{


int i = 0;





AnswerToEverything(%26amp;i);





/* The value of the variable i is now 42 */


printf("%d\n", i);


}


How is GRAPHICS using C++ LANGUAGE is GENERATED? PLEASE ANSWER.?

I desperately want to know that using what features of C++ Language. (Maybe sounding silly but is it by using something like Polymorphism, Inheritance, templates or something else for that matter.)


And is that topic included in the following book (please look at the table of contents posted there) which claims to be a complete reference to C++


http://www.mhprofessional.com/product.ph...





I want to know how the graphics is generated in OS's like Windows XP and MAC's. The last time I asked this question-- someone answered WIN32. What the hell is WIN32 and who is asking for that rather I would like to know that if its WIN32, how is THAT written(using what features) ?


Please give a simple worded and understandable answer.

How is GRAPHICS using C++ LANGUAGE is GENERATED? PLEASE ANSWER.?
You won't find a good answer to this question.





The reason is that c++ does not have a graphics API. It is a relatively low level language. It needs to call on some kind of library to generate the graphics (unless it is the library or it contains the library). On Windows platforms that is the GDI subset of the WIN32 API, generally wrapped in a class library such as MFC or within the .NET framework. On a lower level for games programming on Windows you would use DirectX. One great cross platform library is OpenGL which works on Windows, Apple and UNIX platforms. UNIX platforms use libraries built upon the X Server. If you want to bypass the operating system's libraries then you would have to write your own drivers for the host computer's graphics hardware. Trust me; this won't be easy.





A completely different way to answer this question would be about generating graphics data instead of graphical output direct to hardware. Libraries like GD would be of use for you if you wanted to generate graphics from a c++ web application which would have to generate GIF, PNG or JPG files. Such an app based on a different library could even generate Flash or SVG.





Your question is far too open ended to generate any real quality answers. I hope my humble attempt at an answer at least will help you to ask questions which will better bring you to your goal.


In Excel R[1]C[1] referencing mode, is there a way to use variables or operations? Like R(2*5)C(1) or R(x)C?

Thanks!!

In Excel R[1]C[1] referencing mode, is there a way to use variables or operations? Like R(2*5)C(1) or R(x)C?
=INDEX(1:65536,2*5,2+4)





2*5 will result in row 10, and 2+4 will result in column 6


C as Constant Question?

I've read several textbooks on relativity, and I haven't come across any convincing arguments as to why the constant c, should be the same everywhere and for all time. So I was wondering if the general argument goes something like this:





Assume that we are not in some special place in the universe and that the laws of physics are the same everywhere for all inertial reference frames. c as constant is part of our laws of physics.





We want to check to see if relativity should hold at some arbitrary space-time coordinate, Point.Q.





If the Principle of Relativity holds now, for all reference frames in our now (call our now, Now.A), then it is possible to find another reference frame in our now, call this one Frame.B, such that in Frame.B's now, point.Q lies on Now.B's now axis.





Since the c as constant holds for Frame.B (by assumption), it must also hold for Point.Q





Look about right?

C as Constant Question?
I've always wondered that too. If c were very slowly changing (and that begs the question of whether it is Planck's constant h and/or the permativity constant epsilon that is changing), the constant approximation would yield consistent agreement with all short-time experimental results. The question is what would be the effect on long-time experiments and could we differentiate it from c being constant for all time in some experiment. E.g., perhaps it could be a small effect which gets mixed with the Doppler effect and is hard to distinguish, for a multi-billion year old view of a quasar, say. Maybe c is constant and it is 5 billion light years away, or maybe c varies slowly and it is 4 or 6 billion light years away. Could we tell? It might not violate Hubble's law, just attribute it to more than one cause--universal expansion and fundamental "constant" shift/drift. In fact, perhaps the expansion and shift of the constants could be related. Afterall, would it be surprising if the speed of propogation in a media changed as it expanded/reduced density? Maybe the universe is like the surface of a taut, expanding balloon (but with an extra dimension). As the balloon expands, it grows tauter, and the frequency of vibrations traveling through it changes.


Now, what is the "media" is for E%26amp;M propogation in the universe? Space time? The quaint old idea of the Aether? No, not that. Michelson-Morley's experiment disuaded most of us of that idea.


Anyhow, I ramble. But I do think it is a good question you ask and not one that I've heard adequately addressed by physicists or astrophysicists.
Reply:Right C is the speed of light in all reference frames. You can also see this mathematically. Suppose you're in a rocket moving relative to earth and the rocket shoots forward a signal with speed c relative to the rocket. The speed , u,of the signal relative to the earth is


u = (u' + v)/(1+ u'v/c^2), where u' is the speed of the signal and v is the speed of the rocket.


So u = (c+v)/(1+cv/c^2) = (c+v)/(1+v/c)


=c(1+v/c)/(1+v/c) = c.


Therefore the observers in both reference frames, the earth and the rocket, see that the speed of the signal is c. This is different from the conclusion in classical physics, where the observer on earth would see the that the speed of the signal is c+v.








Later note: Maybe it's that deterministic philosophy held my many scientists, that if we know something about the universe at a particular point and time, then we somthing about it at all other points and times. But I agree with you, maybe the laws of physics break down entirely at the edge of the universe.
Reply:Uh, the value of "C" is only considered mathematically when in a "perfect" vacuum. The speed of light slows down considerably when shined from a flashlight thru a glass of water- the blue shades bend less, the red shades bend more, and the photons DO slow down. If they didn't it wouldn't refract
Reply:Responders prune and epidavros are both correct. Relativity theory was developed to explain the unexpected result of Michelson and Morley's experiment, which showed that the speed of light is constant in all reference frames. M%26amp;M had been expecting to see the speed of light influenced by the earth's motion around the sun, and were surprised to find that it isn't.
Reply:If you don't believe Albert, Try to refute him.


He said that the one Constant in the Universe is


the Velocity of Light. Nothing has "Shown Up"


yet to prove him wrong. He said nothing can travel


faster than light. Some people say that light


travels at 185,000 miles per second and other


people say 186,000 miles per second. Maybe its


185,364 miles per second. Makes no difference


to Albert. He came up with the formula that has not been seriously disputed.
Reply:see ? c? E= C+C squared=E ) the M squared=E ,now mathmatical lingo them-th=em so does mc2? relativity is symply finding similarity or rhimes ,if mc2 then e =educated and if its not the see or c then yur blind and dont see that c is not always a question but a statement telling yu to c!! so see, its not a constant question unless yu never see the point and are constantly askin
Reply:There has to be a reason why the value of "c" was chosen. The reason lies in a three-fold concept. It is the physics trilogy:





E = mc2, why mass exists





m = E/c2, the formation of mass





c2 = E/m, why a gravitational/time field exists





The last demonstrates why relativity becomes a product. There is a three page, easy to understand, writing at http://timebones.blogspot.com
Reply:The independence of c on reference frame is an experimental result. Its not something you can work out from theory - its an observation on which the theory is based.

redbud